Defining and Testing Calculated Variables
Use
In the Calculated Variables screen area, you can specify calculated variables by defining variable names and expressions that you create using the expression editor (see: Expression Editor.) You can use the variables of the response message configuration in the expressions.
Prerequisites
-
You have defined a request message for your Web service destination system on the Request Message Configuration tab.
-
You have tested the request message by choosing the Test Request Message pushbutton.
-
In the Set Variables dialog box, you have entered values for the request message variables you defined to be able to test the Web service.
-
On the Response Message Configuration tab, you first defined the response variables by assigning the variables to individual fields of the response message.
Procedure
To generate calculated variables, do the following:
-
Generate a new calculated variable by choosing the Add Calculated Variable pushbutton.
-
Define a unique name for the calculated variable. Note that the name of the calculated variable must not correspond to an existing request variable or response variable or to another calculated variable.
-
Choose a data type for the calculated variable. The result of the expression is converted at the runtime of the agent into the selected data type, if this is possible.
-
Define an expression by selecting a row and choosing the pushbutton Edit Expression for Selected Calculated Variable.
-
In the Expression Editor dialog box, define an expression using the available functions and operators. In your expressions, you can use the response variables that are available in the list of variables.
-
Close the expression editor.
-
Save your changes.
-
Check the function of your calculated variables by choosing the Test Calculation pushbutton.
The system calculates, for example, the results of the calculated variables using the values for the response variables that are displayed in the Response Message Configuration table. The results are displayed in the Calculation Result column.