Writing the basic structure of a technical rule in IRL

When you write a technical rule, use the ILOG® Rule Language structure.

About this task

In technical rules, when introduces conditions, and then introduces actions.

Procedure

To write a technical rule, use the following pattern:
rule rulename {
   when {
      // conditions:
      <condition>;
      [<condition>;]*
   }
   then {
      // actions
      [<action>;]*
   }
};
Note: Use a valid identifier name in Java™ syntax for the rulename, except when you use dots, which are accepted.

Example

rule financial.rules.CheckBalance {
   when {
     ...
   }
   then {
     ...
   }
};