Writing conditions in IRL

You can write simple, complex, existence, collection, nonexistence, and evaluate conditions. To write conditions, use the ILOG® Rule Language syntax.

About this task

You can define several types of conditions.

Table 1. Conditions you can write in IRL
Condition name Condition role
Simple condition Checks for every instance of a class and runs the rule for every instance.
Existence condition Checks that at least one instance of a class is available. If it is the case, the existence condition runs the rule once.
Collection condition Gathers all instances of a class and runs the rule once per collection found.
Nonexistence condition Checks that no instance of a class is available. If it is the case, the nonexistence condition runs the rule once. This condition is the negation of simple conditions, existence conditions, and collection conditions.
Evaluate condition Runs global tests on one or several bound variables.
Note: You cannot put an evaluate condition at the beginning of the condition part of a rule. You must add one or more conditions that are not evaluate conditions before the evaluate condition.

Procedure