Reference > Rule Languages > ILOG Rule Language > IRL Keywords > fork

Summary

A ruleflow statement for executing several statement blocks in sequence. This keyword is used in a flowtask body.

Syntax

fork 
{ruleflowStatement} &&
{ruleflowStatement}
[&& {ruleflowStatement}] *

Description

The fork statement is a ruleflow statement. It allows defining several ruleflow statement blocks that execute in parallel.

The flow continues after the fork statement when all the statement blocks of the fork statement have been executed.

Example

flowtask main
{
   body =
   {
      fork
      { T1; T2; }
      &&
      { T3; T4; }
   }
   T5;
};

In the fork statement the first block will be executed, which consists of executing T1, then T2. When T2 finishes its execution, the second block is executed, consisting of executing T3, then T4. When T4 finished, all the fork blocks are finished; T5 can be executed.

See Also

body (in Flow Task), flowtask