Create process variables
You can create a process variable on the Variables tab of the process modeling bar.
Alternatively, you can create a process variable while configuring certain process or activity properties, or while configuring certain activities.
-
Create a process variable on the Variables tab of the process modeling bar
-
Create a process variable directly from the configuration window of certain activities
See the process variable types supported by TotalAgility.
Create a process variable on the Variables tab of the process modeling bar
- Open the process map in which to create a process variable.
-
On the process modeling bar, click
Variables and click
New.
The New variable dialog box is displayed.
-
Enter a unique
Name for the variable, such as CustomerName.
By default, the variable name is displayed as the ID of the variable; however, you can change the ID if needed.
For the naming convention of name and ID, see Name conventions.
-
On the
Type list, select the type of variable, such as
Byte (Default: String).
-
The Label text option is available only for the following variables: String, Nullable string, Bool, Byte, Decimal, Double, Float, JSON expression, Long, Date, Nullable date, and Short.
-
The specified label text name is used when you generate a Take activity form or a Create new job form. For example, when you open the form, Customer name information is displayed.
-
At runtime, the name specified in the label text is displayed in the input and output variables.
-
-
Optional. To use the variable for process initialization, select
Initialization.
This option is not available for a business rule and complex variable.
-
Select, enter, or configure a
Value for the variable.
-
To provide a dynamic value, at runtime, leave the Value empty.
-
In some nodes such as Email, C#, VBNET, and Decision, plain text is being replaced by variable with the same name. For example, if you have a variable called ID and if you type the text VOID, the plain text will be replaced by VO[ID]. This only happens at design time; at runtime the values validate and appear correctly.
-
-
You can configure the display properties for a Bool, Data object, Date, Decimal, String, Nullable string, Byte,
Double, Float, JSON expression, Long, Date, and Nullable date type variables.
- Label text: By default, the variable name is displayed as the label text. You can change the label text if you wish to display a longer piece of text than the variable name.
- The following table describes the additional display properties as applicable.
Type Display properties Byte -
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: 0); (Default Maximum value: 255).
Data object
Value: Set the values either by selecting the required server data model or local data model.
Label text option is not available for the Data object.
Date
-
Show time: If selected, displays the time element at runtime.
-
Min date and Max date: Set the minimum and maximum date values either by selecting the required date and time using the Calendar picker or by clicking fx and using the @Today macro to get the current date or past/future date. For example, to set the date as 5 days from the current date, set the value as @Today+5.
Decimal
-
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: -900719925474); (Default Maximum value: 900719925474).
-
Decimal precision: Enter a value for decimal precision. (Default:2)
Double -
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -900719925474); (Default maximum value: 900719925474).
-
Decimal precision: Enter a value for decimal precision. (Default:2)
Float -
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -900719925474); (Default maximum value: 900719925474).
-
Decimal precision: Enter a value for decimal precision. (Default:2)
Long -
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default minimum value: -2147483647); (Default maximum value: 2147483647).
Nullable Date -
Show time: If selected, displays the time element at runtime.
-
Min date and Max date: Set the minimum and maximum date values either by selecting the required date and time using the Calendar picker or by clicking fx and using the @Today macro to get the current date or past/future date. For example, to set the date as 5 days from the current date, set the value as @Today+5
Short -
Min value and Max value: Enter the acceptable range of values for minimum and maximum values. (Default Minimum value: -32768); (Default Maximum value: 32767).
String and Nullable string
-
Input type: Select one of the following controls as needed.
Single line
If selected, adds a text box for the single-line fields, such as name.
Multi line
If selected, adds a text box that may go beyond one line, such as the customer address.
Drop down If selected, adds a drop-down list based on the selected Data source. Available data source options are:
Lookup Select an existing lookup.
Custom To enter custom data, do the following:
-
Click .
-
Add a Name.
-
Click Add and close.
To quickly add as many values as needed without navigating away, click Add another.
-
To make it a default value, select Default.
Add more items as needed.
Email If selected, adds a text box to an Email field type.
-
-
Max number of characters: Provide the maximum number of characters allowed to enter in the input type selected above. (Default: 10,000)
-
Mandatory: Select this option to make the input type mandatory.
-
Do either of the following:
-
To add one variable at a time, click Add and close.
The New variable dialog box is closed, and the variable is listed on the Variables page.
-
To quickly add as many variables as needed without navigating away from the New variable dialog box, click Add another.
The current variable is added and the New variable dialog box remains open with a clear screen to add another variable. All the variables are listed on the Variables page.
-
-
Similarly, create other process variables.
By default, all the variables are sorted on Name and displayed in ascending order. However, you can sort (ascending or descending) on the following columns: Name, ID, Type, Value, and Initialization.
-
To view the variables of a specific type, on the
Type filter, select the variable type, such as
String. (Default: All)
The variables of the selected type are displayed.The Type filter only contains the variable types that exist in the list for the current process.
-
To change the initialization order for process initialization variables, perform the following steps:
-
Click
Initialization order.
The Initialization variables dialog box is displayed.
- Select the variable and use or to change the order.
- Click OK to return to the Variables page.
-
Click
Initialization order.
-
To map the fields in the data object variable to process variables, perform the following steps:
-
Click the
Data object field mappings link.
The Data object field mappings dialog box is displayed.
-
Click
to add the mappings.
The New data object field mappings dialog box is displayed.
- On the Mapped variable list, select a process variable.
-
On the
Data field list, select the data object variable to map to the process variable.
The Data field list displays the data object variables that are configured in the data model.
-
A simple data object field at any level can be mapped to a simple process variable.
-
When you use the process variables that are associated with the work type fields, the field values are displayed in the work queue queries and at the runtime.
-
If you try to map the same process variable to the multiple data fields, an error is displayed. However, multiple process variables can be mapped to the same data field.
-
At runtime, the process variables are updated automatically and corresponding work type fields with the process variables are also updated.
-
If a variable uses an output or initialization and mapped to the field mappings, the data model field value to the process variable is not updated.
-
-
Click
Save.
The mappings are added to the list.
-
You can modify or delete the mappings as needed.
When you delete a variable that is mapped to a data object field, it automatically deletes the mapping and the variable.
- Click Save to save the data object field mappings.
-
Click the
Data object field mappings link.
- Save the process.
Create a process variable while configuring process properties
You can create a new variable directly from the process properties panel while configuring process properties, such as Time and cost, Predictive model, and Default settings. The variable automatically gets assigned to the property for which it is created.
For example, to create a new date variable while configuring the Time and cost property, do the following:
- On the properties panel of a process, click Time and cost.
- Select By a date for Duration/Expected finish time.
-
Click
The New variable dialog box is displayed.
- Configure the variable as needed.
-
Click
Add and close. To quickly add as many variables as needed without
navigating away, click
Add another.
The newly created variable is automatically assigned to the Duration/Expected finish time property.
Create a process variable while configuring activities
You can create a new variable directly from the configuration window of activities such as .Net, Web service, and Data access, and when configuring the metadata for nodes such as "SharePoint add item. "
For example, to create a new variable for the .Net activity, do the following:
- On the Configuration tab of the .Net activity, click Configure for parameters.
- Click the down arrow for Value.
-
Click
The New variable dialog box is displayed.
- Configure the variable as needed.
-
Click
Add and close. To quickly add as many variables as needed without
navigating away, click
Add another.
The newly created variable is automatically assigned to the value field of the .Net activity.
Create a process variable while configuring activity properties
You can create a new variable directly from the properties panel of activities while configuring activity properties such as input and output variables, resource assignment, and time and cost.
For example, to create a new variable while configuring resources for an activity, do the following:
- On the properties panel of an activity, click Resource assignment.
- Click Add for Resources.
- On the Add resources dialog box, select Process variable.
-
Click
The New variable dialog box is displayed.
- Configure the variable as needed.
-
Click
Add and close.
The newly created variable is automatically assigned to the Resource assignment property.
How to: Manage process variables