Variables are used to store information to be referenced and manipulated in a process. More precisely, variables are containers that hold information.
A Process or a Workflow can have its own set of variables defined to store and pass data across activities.
You can define, modify, and delete variables from the Variable Pane available at the bottom of the designer canvas.
As depicted below in the screenshot, it has four properties, and the explanation follows.
|Name||The name of the variable. By default, it will be named <variable X>. Here, X is the following available index sharing the same variable name.|
|Variable type||The data type of this variable. You can select it from the dropdown and extend your search by clicking on Browse for Types... in the dropdown. By default, it will be set to String type.|
|Scope||The Scope of this variable. The Scope would be restricted to immediate parent Sequence activity by default. You can change the Scope from the dropdown.|
|Default||The default value for this variable. By default, it will be set to NULL value|
Creating a variable inside Variable Pane
Click on Create Variable inside Variable Pane to create a variable. An entry appears in the variable pane with default values set to all the properties.
You can change the properties according to your needs.
Type can be set by clicking on combo and choosing the appropriate data type. More .Net data types can be viewed by clicking on Browse for Types...
Creating a variable from Expression Editor
You can also create a variable from Expression Editor by following the steps below:
- Inside Expression Editor, hit the keys Ctrl + K
- It will ask for a variable name
- Type in the variable name
- Hit the Enter key
It will create a variable with the specified name. The Type would be set to return-type of the corresponding Expression Editor.
Deleting a variable
In order to delete variable, select and right-click on variable row entry inside Variable Pane. Popup window appears, in which click on Delete. This will delete the variable entry.