# Workflows ```{toctree} :glob: :hidden: workflows/* ``` Workflows consist of two components: the Workflow Configuration within the []() and the according [powerJobs Processor job](). ## Configuration Before setting up the Configuration Manager, the proper configuration of the [Fusion 360 Manage Tenant]() is required.\ Afterwards the [Tenant Settings]() can be configured in the Vault Client to allow powerPLM (powerFLC) Workflows to establish a connection to Fusion 360 Manage. In order to give workflows the possibility to perform their actions with the correct Fusion 360 Manage user, the e-mail address of the Vault user that submitted the according job must be configured in the [Vault User profile](): ```{image} /img/vault_email_configuration.png :width: 400px ``` This same email address must be present for the [Fusion 360 Manage User](): ```{image} /img/flc_user_email.png :width: 800px ``` ## Jobs powerPLM (powerFLC) is delivered with two sample workflow jobs []() and [](). Their purpose is help people getting started with creating their own workflows based on [powerJobs Processor]().\ The samples cover the most common scenarios for exchanging data between Vault and Fusion 360 Manage and is highly [customizable]().\ We recommend to copy the sample workflow script and create your own [Custom Workflow]() job, when additional customizations are preferred. Make sure to start the [powerJobs.exe]() at least once to make sure the workflow [job types are synchronized]() and can be processed by powerJobs Processor. ```{image} /img/powerjobsprocessor_executing_job.png :width: 700px ``` ### Modules Following PowerShell script modules are delivered with powerPLM (powerFLC) and installed in the powerJobs Processor module directory: - coolOrange.powerFLC.Workflows.MappingFunctions.psm1 - coolOrange.powerFLC.Workflows.Common.psm1 - coolOrange.powerFLC.Workflows.Extensions.psm1 - coolOrange.powerFLC.Workflows.Async.psm1 #### coolOrange.powerFLC.Workflows.Common.psm1 Contains functions to simplify the workflow jobs.\ Important functionalities: - Provides the **\$workflow** variable which supplies the configuration #### coolOrange.powerFLC.Workflows.MappingFunctions.psm1 Contains the functions that are used in the [Field Mappings]() dialog. ## Workflow trigger In order to execute a [Workflow Job]() after Vault **lifecycle changes**, the Vault lifecycle state transition must be extended with the Job Type matching the **“Workflow Name”**.\ See the delivered samples [Sample.TransferItemBOMs]() and [Sample.SyncChangeOrders]() are enqueued after changing the state of Vault entities. Alternatives for queueing jobs automatically are client-side PowerShell customizations using the `Add-VaultJob` cmdlet, or settings to submit jobs regularly at specific [Intervals]().