Variables of a Multiple Call Destination System
Categories of Variables
You can define the variables to be used for the multiple call destination system on the Variables tab. A multiple call destination system offers three categories of variables:
-
Input variables
-
Output variables
-
Local Variables
Input variables and output variables define the interface of the multiple call destination system to a notification or to another multiple call destination system that calls the multiple call destination system.
In a tag-based notification, the input variables are filled by the output expressions of the notification.
In a method notification, the input variables are filled by the input parameters of the notification. In the method notification, you can assign the output variables of the multiple call destination system to the output parameters of the method that is connected to the notification.
Local variables can only be seen and used within a multiple call destination system. They can be used for converting variable values for destination system calls, for storing interim results, or for defining fixed values within a multiple call destination system.
Value Assignments
The type of assignment of variable values depends on the variable category:
-
Input variables
Input variables get an initial value at the start of the call of a multiple call destination system. This value results from the assignment of output expressions or input parameters of the notification to the input variables. Moreover, input variables can be updated by the output variables of destination systems that are called by the multiple call destination system.
-
Local and Output Variables
In contrast to input variables, values of output variables and local variables are always calculated or are set by the output of destination system calls. Calculations are formula expressions in which you can use fixed values and other variables of the multiple call destination system. You define the calculation expressions on the Variables tab.
If you select the Permanent checkbox, you can specify that a local variable becomes a permanent local variable. The prerequisite for this is that you have selected the Exclusive Lock checkbox on the General Settings tab. For the permanent local variables, you define an initial value that is assigned to and retained by these variables when the agent instance is started. Other variables of the multiple call destination system cannot be used to calculate permanent local variables.
Initial values can be constant values, such as 0, 1,"", true, or false , but also calculations without using variables, such as datenow, emptymap, arrayCreate("System.String", 3), or structNew().
Permanent local variables can only change their value through the output of destination system calls, for example, through the return values of a universal Web service destination system. This includes the call of the built-in functions, such as @Calculation or @Increment.
If the Make Permanent Local Variables Persistent checkbox on the General Settings tab of the multiple call destination system is selected, the variable values are also retained after an agent instance is restarted. If necessary, they can be reset to their initial values for each agent instance.
Calculation Expressions and Calculations of Values
You define the calculations that are to be made using the expression editor (see Expression Editor). In the calculation expressions, you can use multiple call destination system variables, the update count, the functions of the expression editor, and fixed values.
If a calculation expression only consists of fixed values or functions that are not dependent on other variables, the calculation is made at the start of the call of a multiple call destination system.
If the calculation of a variable depends on other variables, a calculation is always made as soon as the value of a used variable changes and when all variables used in an expression already have a value. The result of using variables in calculation expressions is a specific calculation sequence. (See: Example of Calculating Variable Values.)
Update Count
Each variable of a multiple call destination system has, in addition to its actual value, an update count. The update count increases with each calculation or value assignment of a variable. The update count of a variable can be accessed in calculation expressions with the suffix .updateCount.
You can use update counts, for example, in branching conditions to define a termination condition for loops.
Data Types of Variables
For each variable of a multiple call destination system you can define a data type that you select corresponding to the variables of the called destination systems or to the output parameters of the method from which the multiple call destination system is called. Using local variables allows you to convert data types.