select
The select keyword selects a rule in a rule task.
Purpose
This keyword is used to select a rule in the list of rules that compose the rule task body.
Context
Rule tasks
Syntax
ruletask ruleTaskName
{
body = select(?rule) {action1 ... actionq}
};
Description
You can either specify each rule name explicitly (extension) or have the list of rules computed from the code, which uses the select or dynamicselect keywords (comprehension). The given code must return a Boolean value.
In the classic rule engine, the difference between dynamicselect and select is in the number of times the code is evaluated. In both cases, the code is evaluated the first time the task is called.
dynamicselect statements are called each time the task is executed.
select statements are called only once, the first time the task is executed.
In the decision engine, there is no difference between dynamicselect and select. select behaves the same way as dynamicselect where the statement is called each time the task is executed.