Skip to content

Variables

Nilesh Ghodekar edited this page Oct 28, 2016 · 4 revisions

What are Variables?

A WAL Variable allows you to define a temporary storage location for information that may be consumed by the subsequent "update definitions" in the same Update Resources and Create Resource activities. Variables of standard types can be created on the fly here and retrieved as easily. The data type of the data is derived from the data on-hand.

The variable names start with the $ character just like in PowerShell and can contain a mix of letters, numbers and underscores (but cannot have a number immediately after $). e.g. $MyVariable.

Note: The variable name $__BREAK_ITERATION__ is reserved and is used to break out of the Iteration loop when set to true (or 1).

The following screenshot snippet shows a Create Resource activity using a variable named $DisplayName. The first value expression defines the variable which is then used in the next two value expressions to populate DisplayName and AccountName attributes of the target resource.

Variables-Example01-CreateResource

For an example of Update Resources activity making use of variables, see Complex Approval Scenario.

Variable Scope

The variables are local to the activity they are defined in and cannot be used out-side of "update definitions" in that activity.

Variables vs WorkflowData

Variables is a WAL construct providing a temporary storage location for information that is used by the subsequent "update definitions" in the same activity while the WorkflowData dictionary is a FIM / MIM mechanism to provide a temporary storage location for information that may be required by other downstream activities within the same workflow.

[//WorkflowData/..] lookup is used to read and write to the WorkflowData dictionary where as the variable is accessed by its name.

Clone this wiki locally