Business Action: Set Workflow Variable

This operation can copy a static value, an attribute value, or a workflow variable value, to a workflow variable value.

For example, a group of five users have access to a workflow, and can submit a product from the Edit state to the Review state. There requirement is to identify which of these users submitted a particular product. This action is added to a business rule to save the details to an attribute. The business action is set on the desired state in the State Editor on the 'On Exit' tab.

Prerequisites

Before using this operation:

  1. Ensure at least one variable exists on the workflow. For more information on workflow variables, refer to the Workflow Variables topic in the Workflows documentation here.
  2. Create a business rule as defined in the Creating a Business Rule, Function, or Library topic here.

Configuration

  1. On the Edit Operation dialog, select the Set Workflow Variable option from the dropdown.
  2. Select the target workflow by typing into the field on the left to use the auto-complete search functionality, or click the ellipsis button () to display the Select Workflow dialog. Use search or browse to select the workflow, then click the Select button. The selected workflow must have variables.
  3. Select the target workflow variable from the Variable dropdown. The selected variable for this workflow will be changed to be equal to the value that exists in the source.
  4. In the center dropdown parameter, make a selection to display additional required parameters.
  • When Attribute Value is selected, the source attribute parameter is displayed. The attribute must be externally maintained and a description attribute. Use this option when an attribute has a different value in different states of the workflow. This allows you to store the values inside the workflow for access when the workflow reaches the final state.

Select the source attribute by typing into the field on the right to use the auto-complete search functionality, or click the ellipsis button () to display the Select Attribute dialog. Use search or browse to select the attribute, then click the Select button.

  • When Workflow Variable is selected, the source select workflow and source select variable parameters are displayed. Use this option when two workflows are dependent on each other, and one workflow needs values which are stored inside the other workflow.

Select the source workflow by typing into the field on the right to use the auto-complete search functionality, or click the ellipsis button () to display the Select Workflow dialog. Use search or browse to select the workflow, then click the Select button.

Use the Variable dropdown to select the variable that holds the value used to update the target attribute value.

  • When Value is selected, a source value text box is displayed. Use this option to store values which can only be used inside the workflow.

Set the source value by typing into the field on the right. This text will be used to update the target value.

  1. Click the Save button to add the operation to the business rule editor.