Orchestrating ruleset execution

You combine rules and rule artifacts into a ruleset for subsequent execution. You can pass data and share code in a ruleset, and manage the flow of rule execution.

Rules apply decisions, but they do not have a defined sequence or succession. A ruleflow organizes rules into a sequence of decisions by assembling the rules into a group of rule tasks that uses a set execution pattern.

Each rule task is evaluated to produce a result, or decision. All these results and decisions are combined to produce a single business decision, which is represented by a ruleflow. Ruleflows also specify the transitions between rule tasks. The transitions determine how, when, and under what conditions to use each rule task.

The following diagram shows the levels of refinement for selecting the rules.

Diagram of rule selection for execution.

The evaluation during ruleset execution selects rules in the following manner:

  1. Ruleflow scope selection

    Each rule task in a ruleflow has a scope that is defined by a list of rule packages and individual rules. At run time, ruleflow scope selection generates a list of the rule packages and rules that you defined for each task. When a task is run, the rule engine considers only the rules within this scope.

  2. Runtime rule selection

    The runtime rule selection process further determines which rules the rule engine must consider. Filtering is typically based on the value of rule properties and execution parameters.

  3. Rule overriding

    After the other selection mechanisms are run, certain rules that you defined beforehand override other rules. The overridden rules are filtered out of the selection.

The rule engine evaluates the conditions of the selected rules, and runs their rule actions on the matching objects.