Skip to main content
Version: 4.13.2

SetVariable component

In Dovetail each flow has it's own environment variables, which makes it impossible to exchange variables with other flows. With global variables you can set variables that are available across all flows. These variables can be get by the GetVariable Component and removed by the RemoveVariable Component.

The SetVariable component can be used to put body and header information into global variables. You can chain multiple SetVariable components together to modify multiple global variables.

Configuration

The SetVariable component has the following configuration options:

PropertyDescription
Global VariableThe name of the global variable you wish to set
Expression TypeThe language of the expression.
ValueThe value you wish to set on the variable, when installed on test it sets the test value when installed on production the production value.
Encrypt?If the variable could contain sensitive information you can choose to store it encrypted.

Expression Types

Expressions can be defined using the following types:

Expression TypeDescription
SimpleSimple Expression Language, which also supports File Expression Language. It only returns plain text, no xml.
XPathXPath 2.0 language. It only returns plain text, no xml.
JsonPathJsonPath language.
GroovyGroovy. It only supports one-line expressions. Use the script component for multiline scripts.
ConstantWhen using ${header.<headername>} as (part of) a Constant the literal string will be set as the Global variable, not it's value.

Remarks

  • The Global Variable field only supports #{<flow_variable>}, ${header.<headername>}, ${headers.<headername>} and ${bodyAs(String)} expressions.