Sequential mode

The sequential mode provides performance advantages by running all the eligible rules for a rule task in sequence.

The following diagram shows how the sequential algorithm works.

Diagram of the rule engine in sequential mode

The sequential algorithm operates as follows:

  1. The rule engine does pattern matching on input ruleset parameters and on the conditions defined on the collections of objects in working memory.

  2. For each match, a rule instance is created and immediately run. When a rule instance is run, it sets the value of an attribute or an output ruleset parameter.

Rules that are run with the sequential algorithm are stateless. The sequential algorithm operates rather like an execution stack where pattern–matching rule instances are run once with no reevaluation of the rules. In rules that are run in sequential mode, you cannot use existence conditions, such as there is at least one, or the number of, in relation to objects in the working memory.

Because of its systematic nature, the sequential execution mode does well on validation and compliance types of applications.

Rules can be processed sequentially by using rule tasks within a ruleflow, see Ruleflows.

Sequential processing is specified in the algorithm property of the rule task. You can select it explicitly in Rule Designer. See Choosing an execution mode.