Variable Manager
Description
This action is used to manipulate variables.
Refer to Work with variables for more information about variables. |
Parameters
Name | Mandatory | Default | Description |
---|---|---|---|
Var Name |
Yes |
Name of the variable. |
|
Var Type |
Yes |
Type of the variable: boolean, integer, float or string. |
|
Var Default Value |
No |
Default value for this variable. |
|
Var Don’t Save |
No |
false |
Set to true to avoid persistence of the variable value. |
Var Save Connection |
No |
Connection used to save the variable’s value. |
|
Var Save Transaction |
No |
Transaction used to save the variable’s value. |
|
Var Save Transaction Type |
No |
AUCOMMIT |
Transaction type used to save the variable’s value. |
Var Save Schema Name |
No |
AUCOMMIT |
Type of transaction used to save the variable’s value. |
Var Save Type |
No |
LastValue |
This action can save either AllValues or the LastValue of the variable. |
Var Value |
No |
Value given to the variable if a SetValue operation is used. |
|
Var Increment Value |
No |
Value by which the variable will be incremented if an IncrementValue operation is used. |
|
Var Operation |
No |
AutomaticValue |
Operation performed on the variable. See below for more information. |
Var Save Date Limit |
No |
–1 |
Limit (in milliseconds) during which the variable history is kept. Values beyond this limit are purged when PurgeHistory is performed or when the values are saved in the database. –1 stands for no time limit. |
Var Save Number Limit |
No |
–1 |
Number of values to keep in the variable history. Values beyond this limit are purged when PurgeHistory is performed or when the values are saved in the database. –1 stands for no limit. |
Var Refresh Connection |
No |
Connection used for the RefreshValue operation on this variable. |
|
Var Refresh Transaction |
No |
Transaction used for the RefreshValue operation on this variable. |
|
Var Refresh Transaction Type |
No |
AUTOCOMMIT |
Type of transaction used for the RefreshValue operation on this variable. |
Var Refresh SQL |
No |
SQL Code used to refresh the variable value. |
Variable operations
The following operations can be set in the Var Operation parameter.
-
AutomaticValue: Sets an automatic value for the variable (see below for more information)
-
SetValue: Sets the variable to the value provided in Var Value.
-
SetDefaultValue: Sets the variable to its default value. This default value must be defined.
-
RefreshValue: Refreshes the value with the SQL query defined in its metadata. This query must return a valid value.
-
IncrementValue: Increments the variable with the value provided in Var Increment Value.
-
SaveCurrentValue: Preserves the current value of the variable.
-
PurgeHistory: Purges the history for the variable according to the values defined in Var Save Data Limit and Var Save Number Limit.
When using the AutomaticValue operation, the variable is searched using the following sequence:
-
If the current session stores a value for this variable then it is used,
-
or else if the variable saves its values and saved values are available, the latest saved value available is used,
-
or else if a RefreshValue operation returns a valid value, this value is used,
-
otherwise an error is raised.