How to Implement a Complex Gateway

Writing Expressions 22-9

22.7.1 How to Use a Data Object in an Expression

You can use a data objects in your expressions to perform calculations based on them. To use a data object in an expression: 1. Open the Simple Expression Builder. 2. Place the cursor where you want to insert the data object. 3. From the variables section, select a data object.

4. Click Insert Into Expression.

The selected data object appears in the Expression text area.

22.7.2 How to Use a Function in an Expression

To use a function in an expression, you can select the expression from the expression list in the simple expression builder, or you can type the function name in the Expression text area. If you write part of the name and press Crtl+Space, then the expression builder completes the name of the function. To use a function in an expression using the simple expression builder: 1. Open the Simple Expression Builder. 2. Place the cursor where you want to insert the function.

3. From the Functions section, select a type of function.

4. From the Functions list, select a function.

The Description field shows a description of the function.

5. Click Insert Into Expression.

The selected function appears in the Expression text area.

22.8 Simple Expression Builder Supported Operators

The Simple Expression Builder enables you to create expressions using the following operator types: ■ Arithmetic Operators ■ Unary Operators ■ Equality and Relational Operators ■ Conditional Operators You can use these operators to write expressions and conditions to drive your process flow. Generally these expressions perform their calculations based on the data objects in your process. You can write expressions and conditions using the value of the data objects, but you cannot modify their value. The following examples of expressions use operators: ■ totalAmount - discount ■ deadlineExpired and orderStatus =complete ■ activationCount 3 ■ unitsSold = 1200 22-10 Modeling and Implementation Guide for Oracle Business Process Management ■ ’now’ + ’2m’ ■ deadline - ’1h’ ■ not formComplete Table 22–1 , Table 22–2 , Table 22–3 , Table 22–4 and Table 22–5 describe the supported operators in the Simple Expression Builder. Table 22–2 Arithmetic Operators Operator Name Description + Addition Adds numeric data types. Concatenates Strings. Add an interval value to a DateTime value. - Subtraction Subtracts numeric data types. Subtracts an interval value from a DateTime value. Multiplication Multiplies numeric data types. Division Divides numeric data types. rem Remainder Calculates the remainder of a division in which the divisor does not exactly divide the dividend. Precedence Indicates the order of evaluation of an arithmetic expression. Table 22–3 Unary Operators Operator Name Description + Plus Has no effect on the value of the numeric operand. Use it to indicate explicitly that a certain value is positive. - Minus Negates an arithmetic expression. Inverts the sign of a number. not Not Logical complement operator. Negates the value of a boolean expression. Table 22–4 Equality and Relational Operators Operator Name Description = Equal Returns true if the first operand equals the second operand. = Not Equal Returns true if the first operand is not equal to the second operand. Greater Than Returns true if the first operand is greater than the second operand. = Greater Than or Equal to Returns true if the first operand is greater than or equal to the second operand. Less Than Returns true if the first operand is less than the second operand. = Less Than or Equal to Returns true if the first operand is less than or equal to the second operand. Table 22–5 Conditional Operators Operator Name Description and Conditional And Returns true if both operands evaluate to true.