Ruleflow Design

The ruleflow defines the execution order of rule artifacts within the context of a larger decision, so they control the execution of business rules.

Figure 1. ODM Integration sample ruleflow
ODM_RuleFlow.jpeg

The ruleflow is mainly comprised of three action tasks and three rule tasks.

Action Tasks:
  1. 'for each routing slip' The routing slip document can contain multiple routing slips. This action task iterates over each routing slip in the document and for each routing slip the flow propagates and tests to see if it is processing a brand new empty routing slip or if the routing slip is an update to one previously generated. For brand new empty routing slips the flow propagates to the 'Initial Routing' rule task otherwise the flow propagates to the 'for all activities' action task.
  2. 'for all activities' This action iterates over each child of the activities element. For each activity or activityGroup element the flow propagates to the 'Evaluate Activity Group' rule task and then on to the 'for each sub activity' action task.
  3. 'for each sub activity' This action iterates over all activity elements in the activityGroup and for each activity propagates to the 'Evaluate Activity' rule task. If the there is no activityGroup (it was a non grouped activity located at step 2) the action propagates just once to the 'Evaluate Activity' rule task.
Rule Tasks
  1. 'Initial Routing' Invokes a decision table to build a new set of activities based on the properties in the routing slip.
  2. 'Evaluate Activity Group' Invokes a decision table to evaluate the status of existing activity groups in a routing slip to build a new routing slip based on the current state.
  3. 'Evaluate Activity' Invokes a decision table to evaluate the status of an existing activity in a routing slip to build a new routing slip based on the current state.