# Workflow Settings The Workflow Settings dialog allows to create, modify and remove workflow settings and mappings. After confirming the **Workflow name**, **Fusion Lifecycle Workspace** and **Vault Entity Type** in the [New Workflow]() dialog, this dialog will open.\ The dialog can be started even by **double-clicking** a workflow entry in the [Configuration-Manager]() dialog. ## Unique Identifier For the Fusion 360 Manage *Workspace* and the *Vault Entity* the unique field must be chosen, that is used to identify the Fusion 360 Manage Item with the according Vault Entity and vice versa. ```{image} /img/configuration_manager/workflow_settings_unique_identifier.png :width: 550px ``` ### 1. Fusion Lifecycle FileId The field name which is the unique identifier for the *Item* in the selected Fusion 360 Manage Workspace. ### 2. Vault Property The field name which is the unique identifier for the selected *Entity Type* in Vault. ## Workflow Setting(s) The *Workflow Settings* section allows to create, modify and remove settings. These settings are retrieved in the workflow (e.g. the powerJobs Job) and can have constant or dynamic values. ```{image} /img/configuration_manager/workflow_settings_workflow_settings.png :width: 550px ``` ### 1. Name Name of the setting. Used to get the value in the workflow by using the [$workflow]() variable.\ For instance `$workflow.Some_text_setting`. ### 2. Type Possible Datatypes of the settings are: ```{list-table} :widths: 20 80 * - Text - * - Boolean - * - Number - * - Date - * - FLC Item Details Field - * - FLC BOM Field - * - FLC Grid Field - * - FLC State - The Fusion Lifecycle workflow states can be configred in: *Administration->Workspace Manager->[Workspace]->Workflow Editor*. * - FLC States - List of multiple workflow states. Similar to *FLC State* type. * - Vault Category - The name of a Vault Category that is available for the selected *Vault Entity Type* can be chosen. * - Vault Lifecycle Definition - * - Vault Lifecycle State - * - Vault Lifecycle States - * - Vault Property - The name of a Vault Property that is available for the selected *Vault Entity Type* can be chosen. * - Vault Folder - In the Vault folder browser a target Folder must be chosen and its Vault Path will be configured. * - Local Folder - ``` ### 3. Value A constant value for the field or an expression that is evaluated when the workflow is executed. Clicking on the button opens a dialog to set the value. ### 4. New Workflow Setting The button adds a new setting to the table. ### 5. Remove Workflow Setting The button removes the currently selected setting from the table. ### 6. Move Workflow Setting The and buttons move the selected row in the table up or down. :::{admonition} Write protected settings :class: information Settings on imported workflows can be write protected and are displayed in a blue bold font.\ The name and type of those settings **can not be changed**. ::: ## Field Mappings The Field mappings section allows to crate, modify and delete field mapping groups. ```{image} /img/configuration_manager/workflow_settings_fieled_mappings.png :width: 550px ``` Field mapping groups can be edited by **double-clicking** the entry which will open the [Field Mappings]() dialog. ### 1. New Field Mapping group The button opens the [dialog to create a new field mapping group](). ### 2. Remove Field Mapping group The button removes the currently selected field mapping group from the table. ### 3. Move Field Mapping group The and buttons move the selected row in the table up or down. (create-new-field-mapping)= ## Create new Field Mapping ```{image} /img/configuration_manager/new_mapping.png :width: 500px ``` ### 1. Mapping Name Name of the mapping group, must be unique in the workflow. (configuration_manager/workflow_settings:fusion-lifecycle-field-type)= ### 2. Fusion Lifecycle Field Type Possible values are: - Item Field - BOM Field - Grid Field (configuration_manager/workflow_settings:vault-entity-type)= ### 3. Vault Entity Type Possible values are: - Change Order - Custom Object - File - Folder - Item - Bill of Materials ## Field Mappings Dialog Field Mappings are used to map Vault properties or functions to Fusion Lifecycle fields.\ The properties from the [Vault Property]() column will be copied to the field configured in the [Fusion Lifecycle Field]() column, when a [Fusion 360 Manage]() representation of the according Vault Entity is created in Fusion Lifecycle. ```{image} /img/configuration_manager/field_mappings.png :width: 550px ``` As many mappings as needed can be configured. :::{admonition} Mandatory Fusion Lifecycle fields :class: warning Mandatory fields in Fusion 360 Manage Lifecycle must be mapped with the appropriate Vault property, otherwise the according [Workflow Job]() will fail. ::: (configuration_manager/workflow_settings:mapping-target)= ### 1. Mapping target A Fusion Lifecycle field of the selected field type e.g. Item field (configuration_manager/workflow_settings:mapping-sourcevault-property)= ### 2. Mapping Source: Vault Property Vault property of the selected entity type e.g. Item property. (configuration_manager/workflow_settings:mapping-sourcefunction)= ### 3. Mapping source: Function In some situations Item fields cannot be mapped directly to Vault properties, because the required information is not available as entity-property at all. In such cases a PowerShell *Function* can be can be selected by clicking the button.\ Available functions are: `GetVaultName`, `GetVaultServer`, `GetVaultPersistentId`, `GetVaultThickClientLink`,`GetVaultThinClientLink`, `GetItemPositionNumber`.\ Additional functions can be added to the file: *"%ProgramData%\\coolOrange\\powerJobs\\Modules\\coolOrange.powerFLC.Workflows.MappingFunctions.psm1"*. :::{admonition} Performance :class: warning Please note that every configured *Function* gets executed for each individual Vault entity.\ Therefore, many Vault API- or Fusion 360 Manage requests within these PowerShell functions can have a major impact on the execution time of the workflow job! ::: ### 4. New Field Mapping The button adds a new Field Mapping to the table. ### 5. Remove Field Mapping The button removes the currently selected Field Mapping from the table. ### 6. Move Field Mapping The and buttons move the selected row in the table up or down.