11.3 Use Variables in a Workflow

The left panel of the Workflow Details page lists the variables that you can use as steps within a workflow.

You can drag and drop the variables you want to use in the workflow on the design canvas. The Properties Panel available on the right side of the design canvas displays various details about the step such as the following.
  • Name, Type, and the Step sequence number. These are non-editable values.
  • Click the link under Linked Object to view and update the details about the variable.
  • Operation: Select any one from the following:
    • Set Variable - There are two functions for this step:

      Update sets the current value of a variable.

      Increment increases or decreases a numeric value by the specified amount.

    • Refresh Variable - This variable step refreshes the variable by running the query specified in the variable definition.
    • Evaluate Variable: This variable step type compares the value of the variable with a given value according to an operator. If the condition is met, then the evaluation step is true, otherwise it is false.
  • Number of attempts on Failure
  • Time between attempts in seconds(s)
  • Log steps in journal - You can select from Always, Never, or Error.

Here is an example of the use of a variable in a workflow:



In this example, a variable called DEVICE _TYPE with the value "iphone" is used as a step in the workflow. The workflow performs the following actions:

  1. Execute the "REFRESH_DEVICE data flow.
  2. If the "REFRESH_DEVICE" data flow execution is successful, execute the "Load_movies_for_device" data flow.
  3. If the "Load_movies_for_device" data flow execution is successful, execute the "IF_IPHONE" variable evaluation step.
  4. If the variable value is equal to ‘iphone’, execute path for “true”.
  5. If the variable value is not equal to ‘iphone’, execute path for “false”.