| Reference > Rule Languages > ILOG Rule Language > IRL Keywords > select |
select |
PREVIOUS NEXT |
The keyword used to select a rule in a rule task.
ruletask ruleTaskName
{
body = select(?rule) {action1 ... actionq}
};
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.
dynamicselect is invoked each time the task is executed.
select is invoked only once, the first time the task is executed.
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.
| Copyright © 1987-2008 ILOG S.A. All rights reserved. Legal terms. Documentation homepage. | PREVIOUS NEXT |