You can add simple and complex expressions:
In definitions
In the conditions and assign action type in an if-then rule
As actions values in a decision table
As action values in a rule script
Expressions can be simple or compound.
Simple expressions are static or literal values which you can directly enter from the keyboard.
Dynamic values are available in a drop down menu.
A complex expression is usually in the format : E1 mathematical operator E2 where E1 and E2 can be simple or complex expressions. The common mathematical operators are : + , - , * , /
You can add a complex expression only if the return type is a primitive Java type like int, float, double, byte, long, and short.
Complex expressions cannot be created if the return type is char and string.
Only one level of nesting is possible when you create complex expressions. If an expression [E1] has an argument [A1] and this argument has two expressions [E2 and E3], then neither E2 nor E3 can contain further arguments.
Locate the ruleset and double-click the ruleset node.
For more information, see Locating the Ruleset
or
Locate the flow ruleset and double-click the flow ruleset node.
For more information, see Locating the Flow Ruleset
Adding a Complex Expression in a Definition
In the ruleset or flow ruleset editor, choose the Definitions tab.
In the Definition editor, in the Fixed Definitions or Variable Definitions section, choose the RHS value and in the drop down menu choose <Add a new expression>
Adding a Compplex Expression in a Decision Table
In the ruleset or flow ruleset editor, choose the Decision Tables tab.
In the decision table editor, in the action header, select a cell and press F2 .
In the menu that appears choose <Add a new expression> .
Adding a Complex Expression in an If-Then Rule
In the ruleset or flow ruleset editor, choose the Rules tab.
In the rule editor, in the If section, choose .
In the default condition that appears, choose Operation.isSuccessful() and in the drop down menu that appears choose a definition or an alias.
Choose the alias or definition and in the drop down menu choose <Add a new expression> .
In the default condition Operation.isSuccessful() Equals true , if the LHS value is not set, the <Add a new expression option does not show up in the drop down menu.
In the rule editor, in the Then section, choose the RHS value in the Assign action type syntax and choose <Add a new expression> in the drop down menu.
Adding a Complex Expression in a Rule Script
In the flow ruleset editor, choose the Rule Scripts tab.
In the rule script editor, choose
Choose the RHS value and choose <Add a new expression> in the drop down menu.
Modifying Dynamic and Static Values in Complex Expressions
After you add a complex expression, click each of the values in the expression and in the drop down menu choose a dynamic value (Definitions or aliases).
To enter a static value, enter a value in the inline text box.
Modifying Mathematical Operators
Select the operator and choose the desired operator in the drop down menu.
Adding Brackets in Complex Expressions
After you add a complex expression, click values in the complex expression where you want to add brackets. There are options such as <Add open bracket> and <Add close bracket> in the drop down menu.
Deleting an Expression
Place the cursor before the value in the expression and choose Delete .