Variable initial values

Variables have an initial value setting which represents the value it will be assigned at creation. This table shows what values are assigned to variables

Variable type Initial value
Non-collection Either NOT_SET or literal
Collection Either an empty collection or a literal collection with items with values from literals

By default, a collection variable’s initial value will be an empty collection. For non-collection variables, the default initial value will be NOT_SET unless it is one of the following types:

Variable Default initial value
Boolean false
Currency A currency with an amount of 0.0 and code of “USD”
Collection data types empty collection
Decimal 0.0
Duration A duration of 0 milliseconds
Integer 0
String “”

How values are initialized at startup

Flow variables are initialized once, at startup. However, task variables are initialized each time a task starts. For example, if a task is called multiple times in a flow, the variables pick up the initial value setting each time. In other words, when a task ends, the variables go out of scope and are recreated in the next instance of the task.