A rule flow is a sequence of activities for evaluating business rules. The order of the execution of the rules is diagrammatically represented in the form of a flow chart.
It is a reusable entity within a flow ruleset, and is based on activities associated with artifacts such as rule scripts, rule flows, rulesets, flow rulesets, rules, and decision tables. The artifacts and their activities are summarized below. .
Artifacts |
Activity |
---|---|
Rule Script |
Execute Rule Script |
Exclusive Choice Gateway |
Execute Exclusive Choice Gateway |
Ruleset |
Execute Ruleset |
If-Then Rule |
Execute If-Then Rule |
Decision Table |
Execute Decision Table |
Rule Flow |
Execute Rule Flow |
An artifact and its activity are distinct. An activity is based on a reference to the artifact. So these artifacts are reusable, and may be used in other flows too. An activity for an artifact is executing the artifact in a rule flow. .
A flow ruleset always has one rule flow, designated as main flow, besides possibly many other rule flows. The execution of the ruleset starts with the main flow.
Example
The steps to calculate the grade scored by a student is as follows:
Calculate total marks scored by the student
Calculate percentage
If percentage is greater than or equals 35:
Set Grade
or
Set grade = Fail
Create Report
For each of the steps above create activities based on references to artifacts such as if-then rules, decision table and rule script and execute them in a sequence in a rule flow.