Enum Variable
Enum Variable
Use enum data types to define local variables with fixed values during the workflow design phase or as input variables to limit input values to a predefined set of valid options at runtime, such as "Pending," "Approved," or "Rejected." These input variables ensure that users can choose only from the specified options when executing the workflow.
Usage
-
When adding or editing a variable from the Workflow Editor, choose Enum from the Data Type drop-down list.
-
Enter a meaningful Display Name.
-
The Scope can be set to Local, Static, Input, or Output, depending on how the variable will be used in the workflow.
a. If the Scope is set to Local, you can define multiple Option Labels and Option Values for the Enum local variable. The order of these options can be rearranged using drag-and-drop functionality. The "Label" is displayed to the user, while the "Value" is stored in the variable. Local variables only support mapping (as shown in image 3), meaning you must select the desired value during the workflow design phase.
b. If the scope is set to Input, the Enum data type serves as a workflow input. The value is not assigned during the workflow design phase but is instead selected at runtime (as shown in Image 4). The user can then pass this value as an input variable to another activity or sub-workflow.
-
You can also add a new input value at runtime by using the +Add option (as shown in image 5), which appears when you type a value not currently available in the existing drop-down list.
This value is only available for that specific run instance . If you start a new session or return later, the added value will not persist.
- Click Save.
Activities That Support the Enum Variable
Core Activities
-
XPath Query
-
JSONPath Query
-
Escape Regex Metacharacters
-
Find String
-
Convert Json to Xml
-
Match Regex
-
Replace String
-
Substring
-
Trim String
-
XSL Transform
Python Activities
-
Execute Python Script
Table Activities
-
Read Table from JSON
-
Read Table from Text
-
Read Table from XML
Web Service Activities
-
HTTP Request
-
Swagger HTTP Request