Variables
Variables hold values shared by runs of one definition. Use them for a common setting such as an escalation threshold; use workflow input for data belonging to one request. Variables are mutable, not a snapshot of one run's original input.
Open this screen from the saved definition's footer menu. You need permission to edit the definition; see Workflow definition settings if the menu or action is unavailable.
-
Open Variables.
-
Enter a Variable key using only letters
A-Zora-z, digits0-9, and underscores. Do not use spaces or hyphens. -
Enter a valid Variable JSON value, then select Save variable. Reusing a key updates its value.
-
Expand a saved key to inspect its value. Use its Delete action only after checking the expressions that depend on it.
For example, use key reviewPolicy with this JSON value:
{
"approvalThreshold": 500,
"notifyTeam": "operations"
}
A task's Input Parameters can select one property:
{
"threshold": "${['swf:variables'].reviewPolicy.approvalThreshold}"
}
JSON values can be objects, arrays, strings, numbers, booleans or null; quote a JSON string. The screen shows the effective variable-count and value-size limits for your account. Free includes 10 variables and a 256 KiB configured size ceiling; Team includes 100 and a 1 MiB ceiling. Your account's effective allowance may differ; use the values shown on the screen. The size check includes the complete serialized update, including its key and identifying information, not just the value. Leave room below the displayed ceiling. These are byte sizes, not character counts.
Changing or deleting a shared variable can affect later expression evaluations, including work already in progress. Test with a non-production definition first. If a value is rejected, check JSON syntax, the key, count and displayed byte limit. Do not store credentials in variables when a task has a dedicated credentials field.