Start - Variables
- Last UpdatedFeb 13, 2025
- 2 minute read
Variables Property Window
You can set the workflow variables in the Variable property window. To open this window, click the button in the 'Variables' property. The Variables dialog box is displayed in a grid, which has a blank row where you can enter the parameters for a new variable.
The dialog has two tabs at the top to manage the rows of variables in the grid.
-
Add Row - You can click this tab to add the newly entered variable and display a new row to the grid where you can add another variable.
-
Remove Selected - You can click this tab to remove the selected variable in the grid.
The grid has the following parameters that you need to specify for the new variable.
-
Workflow Variables - You can use this field to enter the variable name. Prefix the variable name with '@' if it is a local variable.
-
Type - You can use the drop-down list in this field to select the data type for the variable. The drop-down list displays the following data types - string, number, date, array, actor, object, boolean, float, and decimal.
There are two buttons and a check box at the bottom of the dialog box.
-
Update - You can click this button to save the newly added variable(s).
-
Close - You can click this to close the property window without saving the newly added variables.
-
Last Row needs to be added - You need to select this check box to save the last row added.
Note:
- To initialize the Date variable, enter the date in mm/dd/yyyy format.
- For variables with an Object data type, the data type value will be displayed as JsonElement.
- Since the BinaryFormatter has been removed for serialization and deserialization, use the following code to deserialize objects saved in variables:
IObjectSerializer jsonObjectSerializer = SerializerFactory.Create(ObjectSerializerMethodType.JSON);
MyCustomClass myCustomObject = (MyCustomClass)jsonObjectSerializer.DeserializeJSONIncludingFields<MyCustomClass>((JsonElement)MyWFVariable.Value);
This update reflects the change from BinaryFormatter to JSON serialization, ensuring compatibility with the new deserialization approach.
- Special characters, including ! = | ~ # $ % & * ( ) + ` - { } : " < > ? [ ] ; ' , . /, and space, are not supported in variable names.