Reference > Rule Languages > ILOG Rule Language > IRL Keywords > body (in Flow Task)

Summary

The keyword used to define a flow task body. This keyword is used in the flowtask definition

Syntax

flowtask flowTaskName 
{
    body {ruleflow} 
};

Description

The flow task body defines a ruleflow. It is composed of task invocations that are chained together through control statements. The control statements are:

sequence, if, switch, while (break and continue), fork, goto.

Example

flowtask main
{
   body =
   {
      while(!ending)
      {
         if (turn == Constants.Player1) ChooseMovePlayer1;
         else ChooseMovePlayer2;
         
         CheckMove;
         if (ending) break;
         
         UpdateDistance;
         ExpandObjects;
         DetectConnect4;
         if (ending) break;
         
         DetectGridFull;
         if (ending) break;
         ChangeTurn;
      }
      EndOfGame;
   }
};

See Also

goto, flowtask, fork, if (in Ruleflow), switch, while/break/continue (in ruleflow)