Expression Editor

Definition

The expression editor is used in multiple places in the Management Console. You can use it to formulate expressions and conditions that are based on the variables or subscription items that are available in the respective context. The expression editor supports you with the correct syntactical formulation of the expression or the condition and provides a large number of functions with which you can perform mathematical and logical calculations, date calculations, and string operations. The expression editor is used for the following purposes:

  • Defining conditions

    With the help of the expression editor you formulate a condition that is either false or true at runtime. This use case occurs, for example, when you define the trigger condition of a notification or for exception handling.

  • Branching conditions

    You can use branching conditions to change the otherwise linear sequence of destination system calls when using the multiple call destination system. In this case, the result of a calculation is a step number or a jump target in a multiple call destination system.

  • Defining output expressions and calculating variables

    For this use case, you use the available variables or subscription items to perform a calculation. The result of the calculation is then used, for example, as an output expression of a notification or is assigned to another variable in the multiple call destination system.

Use

You can call the expression editor from the following objects:

  • Notification Tab

    On the Notification tab, you can use the expression editor to define the trigger conditions for triggering a notification message. You need to create a Boolean expression that can be evaluated as true or false. If you use the default setting Trigger Type Always, a conditional expression is not necessary. See also: Notification Tab

  • Output Tab

    On the Output tab, you can use the expression editor to specify which subscribed tag is to be output and, if required, calculate the values that are to be output using the expression editor functions, for example, from subscribed tags or constants. See also: Output Tab and Examples of Message Texts

  • Destination System Calls Tab for the Multiple Call Destination System

    Using branching conditions, you can change the otherwise linear sequence of destination system calls that are configured in the form of steps by calculating the next step number to be executed or the next jump target using calculation expressions (for example, conditions or fixed values) so that another sequence is used. (See also: Multiple Call Destination System and Branching Conditions

    On this tab, you can also define calculations using the predefined function @Calculate.

  • Variables and Calculations Tab for the Multiple Call Destination System

    The existing variables of the multiple call destination system or functions of the expression editor can be linked for calculating additional variable values.

  • Exception Handling for the Multiple Call Destination System and for Enhanced Notification Processing

    You can use the expression editor to define the condition for handling an exception. The variables of the multiple call destination system or of enhanced notification processing are available for the formulation. In addition, you can define within exception handling which values are to be assigned to the variables depending on the exception condition. (See also: Exception Handling.)

  • Definition of Calculated Variables of a Web Service Destination System

    You can use the output variables of a Web service destination system call to formulate expressions that you assign to new calculated variables. (See also: Calculated Variables in a Web Service Response Message.)

Structure

Depending on the use case, the expression editor is called with a list of variables or a list of subscription items that you can use to formulate the expression. For reasons of simplicity, we talk about variables below.

The expression editor consists of the following parts:

  • Expression input field

    You enter the expression in this field. In the simplest scenario, there is a 1:1 relationship between the variable and the expression.

    When you enter an expression, the syntax of the expression is checked. An error icon is displayed if there are syntax errors in the expression. To view the error messages, either display the quick info for the error icon or click the exclamation mark pushbutton to display the error list.

    The elements of an expression that you have entered completely and correctly are identified by syntax highlighting in different colors. (See also: Syntax Highlighting in the Expression Editor.)

  • List of subscription items or variables

    In this list, depending on the context, you find all subscription items or variables that you can use in an expression.

    You can insert an element at the current cursor position in the Expression input field either by double-clicking the element in the list or selecting the element and choosing Insert.

  • List of jump targets

    If you are using the expression editor in the context of a multiple call destination system, you will find the jump targets that you defined in the multiple call destination system in this list. You can, for example, define a calculation expression that results in a jump target.

  • Functions list

    This list contains all the functions that you can use in the expression editor. You add a function at the current cursor position in the Expression input field either by double-clicking the function or selecting the function and choosing Insert. (See also: Functions in the Expression Editor.)