dynamicselect

The dynamicselect keyword specifies the dynamic selection of a rule.

Purpose

This keyword is used to specify the dynamic selection of a rule in a rule task body.

Context

Rule task definitions

Syntax

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

Description

The body of a rule task contains a list of rules. 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 code must return a Boolean value.

In the classic rule engine, the difference between the dynamicselect and select keywords lies in the number of times that the code is evaluated. In both cases, the code is evaluated the first time the task is called.

  • A dynamicselect statement is called each time the task is executed.

  • A select statement is 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.