Set a variable

You can use the Set Variable step to set value of a variable and define the order in which the values are set. The variable is set in the order the variable mappings are listed in the set variable step.

Changes to variable values affect only the instance of the process in which the change occurs. For example, when a workflow is initiated and variable data changes, the changes affect only that instance of the workflow. The changes do not affect other instances of the workflow that were initiated previously or are initiated subsequently.

Depending on the data type of the variable, you can use the following options to set value of a variable:

  • Literal: Use the option when you know the exact value to specify.

  • Expression: Use the option when the value to use is calculated based on an expression. The expression is created in provided expression editor.

  • JSON Dot Notation: Use the option to retrieve a value from a JSON or FDM type variable.

  • XPATH: Use the option to retrieve a value from an XML type variable.

  • Relative to payload: Use the option when the value to be saved to variable is available at a path relative to payload.

  • Absolute path: Use the option when the value to be saved to variable is available at an absolute path.

You can also update specific elements of a JSON or XML type variable using JSON DOT Notation or XPATH notation.