WorkflowData
|
Provides access to a workflow data profile that is created either through the platform or APIs. A workflow data profile is a named set of predefined key/value data pairs. The action provides a drop-down parameter allowing selection from a list of available profiles. After the action runs in a script, the workflow data output will be available as dynamic data variable with the same name as profile selected in the drop-down parameter. For more information on the workflow data function, see the Workflow Data section.
|
Supported Script Types
Properties
Property |
Details |
ProfileName
|
A drop-down list of active workflow data profile names that an administrate created through the platform or from an API. The name is restricted to the same naming patterns as variables that can be created in Studio and will be validated by the API and Admin interfaces. No profiles can be created in Studio, but the data stored under the profile can be accessed through this action.
|
Branches
Branch |
Details |
Default
|
Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the other branches are not defined.
|
Error
|
Path taken when there is an unexpected problem (for example, poor connectivity, syntax errors, and so forth). The _ERR variable should be populated with a condensed explanation of the problem.
|
Output Variables
Variable |
Details |
DynamicData
|
This variable corresponds with the profile name that was selected in the drop-down of the action. |
_Err |
Variable output when the error branch is taken.
|
Tips & Tricks
- If you want to reference the dynamic data object later in the same script, the script that runs this action must declare the DynamicData variable to which the data will return. The example script shows an Assign action after the completion of WorkflowData action with the code {Emergency.raiseAlarm}. The main script will not compile unless you add the declaration Dynamic Emergency to a snippet somewhere in the script (in the example script it is the snippet at the top left). The WorkflowData action populates the declared Emergency variable because Emergency was selected as the profile name. The declaration and profile name must match.
- Typing an invalid name instead of using the drop-down, or deactivating a profile through the admin interface or API results in taking the error branch. The error branch should be scripted as well as the default branch.
Example Script
In the following example, you can see that WorkflowData is the second action in the script, entitled Emergency WF Data.
Would you like to download this script?