You add conditions to a rule when you want the associated actions in the rule to be performed only when the conditions are satisfied.
Example
Consider the rule:
If |
|
Student aggregate score greater than or equal to 60 |
|
Then |
Display message equals “This student qualifies.” |
In this rule the condition is that the aggregate score must be 60% and above. Only if this condition is fulfilled is the student considered qualified.
Conditions are always of the format: “LHS value comparator RHS value”. In the rule editor, under the If section of a rule you can specify the LHS value and RHS value and choose an appropriate comparator.
Locate the ruleset (Where is my ruleset?) and double-click the ruleset node.
In the Outline view, choose the rule node.
In the rule editor that appears, under the If section, choose the Add icon.
The default rule condition: Operation.isSuccessful() Equals true appears.
To edit the default rule condition:
Choose the LHS value:Operation.isSuccessful() and in the drop down menu choose a definition or an alias. You can also choose <Add a new expression> to add compound expressions.
More Information: Creating and Editing Compound Expressions
Choose the comparator:Equals and choose a comparator in the drop down menu.
More Information: List of Return Types and Comparator Choices for Conditions
Choose the RHS value after the comparator and in the drop down menu choose a definition or an alias. You can also choose <Add a new expression> to add compound expressions.
More Information: Creating and Editing Compound Expressions
Note
To enter static values, choose each component in the default rule condition (Operation.isSuccessful() Equals true) and enter the value in the inline text box.