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

Summary

The keyword used to specify dynamic select of a rule in a ruletask body. This keyword is used in the ruletask definition.

Syntax

ruletask ruleTaskName 
{
    body = dynamicselect(?rule) {action1 ... actionr}
};  

Description

A rule task is composed of a list of rules that compose its body. The rule list can be specified either by extension: the rule names are explicitly given, or by comprehension: the rule list is computed from the code that is given (using select or dynamicselect keywords). The given code must return a boolean value.

The difference between dynamicselect and select is in the number of times the code is evaluated. In both cases the code is evaluated when the task is first invoked.

Example

flowtask main
{
body {
  selectTask;selectTask;dynamicselectTask;dynamicselectTask;
     }
}

where selectTask and dynamicselectTask are rule tasks with a body respectively defined with a select and a dynamicselect clause. With this ruleflow, the selectTask body will be evaluated only once, and the dynamicselectTask body will be evaluated twice. If the ruleflow is executed again (after a resetRuleflow()), the selectTask body will be evaluated again.

See Also

body (in Rule Task), ruletask