Execution properties for rule tasks

Specific execution properties are available for rule tasks so that you can control rule execution in different execution modes.

Task sequencing in a ruleflow specifies the general order in which tasks are executed. In a ruleflow, each rule task has control settings for defining the execution order of its rules.

To specify the task settings, select the task in the Diagram page and use the Properties view to specify the following control settings.

Table 1. Control settings for rule tasks
Action Location Description
Rule selection Rule Selection tab in Properties view for rule task. Click Edit to add and change the order of rules and rule packages by using the Select Rules dialog. See Adding rules to rule tasks for more information.
Runtime rule selection Dynamic BAL, Static BAL and IRL in the Rule Selection tab of the Properties view for rule task. Control which rules are evaluated in a rule task. See Selecting rules at run time for more information.
Execution mode Rule Task tab in Properties view for rule task. Specifies an execution mode for the rule task. See Defining rule task execution properties for details.
Rule task ordering Rule Selection tab in Properties view for rule task.

The default ordering of a rule task:

  • Default the ordering of rules depends on the execution mode.

  • Literal follows the rule task ordering.

  • Priority sorts rules according to the execution mode in operation.

See Defining rule task execution properties for details.

Rule task exit criteria Rule Task tab in Properties view for rule task. Choose exit criteria specifies how rules are executed before the task terminates. See Defining rule task execution properties for more information.

Control properties for rule tasks in execution modes

You can set specific properties to order rule tasks. These settings operate differently in each execution mode: RetePlus, Sequential and Fastpath. See Engine execution modes for a description of each execution mode.

The following table outlines how ruleflow control properties operate in RetePlus execution mode.

Table 2. Task ordering properties for RetePlus
Ordering property Exit Criteria property Advanced Properties only

Default

A RetePlus network with full agenda management is created.

None

All the rules in the task body are activated. Rule instances are executed until the agenda is empty.

Equivalent to:

firing=allrules, firinglimit=0

firinglimit > 0: instances are executed until either the given number is reached or the agenda is empty.

Rule

Only the highest priority rule of the task body is activated. Rule instances are executed until the agenda is empty.

Equivalent to:

firing=rule, firinglimit=0

RuleInstance

Only the highest priority rule of the task body is activated. Just the first instance of the rule is executed, or none if the agenda is empty.

Equivalent to:

firing=rule, firinglimit=1

Literal

A RetePlus network is created but there is no agenda. Rules are activated one by one according to the order provided by the body, and the instances are executed without reevaluation.

Or:

Priority

A RetePlus network is created but there is no agenda. Rules are first sorted in decreasing order of priority. They are then activated one by one and the instances executed without reevaluation.

None

A loop is made on each of the rules provided in the task body, their instances computed and executed. Instances are executed until the end of the loop.

Equivalent to:

firing=allrules, firinglimit=0

firinglimit > 0: rule instances are executed until either the given number or the end of the loop is reached.

Rule

A loop is made on each rule provided in the task body. As soon as a rule can be instantiated (that is, at least one rule instance is created), all those instances are executed and the loop ends.

Equivalent to:

firing=rule, firinglimit=0

 

RuleInstance

A loop is made on each rule provided in the task body. As soon as a rule can be instantiated (that is, at least one rule instance is created) that instance is executed and the loop ends.

Equivalent to:

firing=rule, firinglimit=1

 

The following table outlines how ruleflow properties operate in sequential execution mode.

Table 3. Task ordering properties for Sequential
Ordering property Exit Criteria property Advanced Properties only

Default

In the sequential mode, the Default property acts the same way as the Priority property.

Literal

Rules are compiled according to the order provided by the task body. Rules are evaluated and executed sequentially against the incoming tuple objects.

Or:

Priority

Rules are sorted according to their priorities. They are then compiled according to the sorted order. The rules are evaluated and executed sequentially against the incoming tuple objects.

None

All the rules provided in the task body are evaluated. All the rules evaluated as true are executed until there are no more rules to select. The order is the one determined by the ordering property.

Equivalent to:

firing=allrules, firinglimit=0

firinglimit > 0: rules evaluated as true are executed until the given number of rules is reached, or there are no more rules to select.

Rule

The rules provided in the task body are evaluated sequentially. As soon as one rule evaluates to true, it is executed and the loop ends.

Equivalent to:

firing=rule

This property forces the firinglimit to 1.

firinglimit

Not applicable.

RuleInstance

Not applicable.

The following table outlines how ruleflow properties operate in Fastpath execution mode.

Table 4. Task ordering properties for Fastpath
Ordering property Exit Criteria property Advanced Properties only

Default

In the Fastpath mode, the Default property acts the same way as the Priority property.

Literal

Rules are compiled according to the order provided by the task body. Rules are evaluated and executed sequentially against the incoming tuple objects.

Or:

Priority

Rules are sorted according to their priority. They are then compiled according to the sort order. The rules are evaluated and executed sequentially against the incoming tuple objects.

None

All the rules provided in the task body are evaluated. All the rules evaluated as true are executed until there are no more rules to select. The order is determined by the ordering property.

Equivalent to:

firing=allrules, firinglimit=0

firinglimit > 0: rules evaluated as true are executed until the given number of rules is reached, or there are no more rules to select.

Rule

The rules provided in the task body are evaluated. As soon as one rule can be instantiated (that is, one rule instance is created), those instances are executed and the loop ends.

Equivalent to:

firing=rule, firinglimit=0

RuleInstance

The rules provided in the task body are evaluated. As soon as one rule can be instantiated (that is, one rule instance is created), that instance is executed and the loop ends.

Equivalent to:

firing=rule, firinglimit=1