Yin and Yang of Business Applications: The Duality of Business Process and Business Rules

Pedram Abrari's picture

One of the most confusing aspects of business rules is how they fit into a business process and vice versa.  When does process end and rules begin?  Does process drive rules or do rules drive process?  The answer is both.  The key, however, is to find the perfect equilibrium between processes and rules.  Business processes are procedural by nature (the how) whereas business rules are declarative by nature (the what).  Process can drive rules and rules can also drive processes.  The yin and the yang!
 
It is possible to implement business rules using only process modeling.  Business rule conditions can be captured using decision nodes in the process model.  By stitching together a series of decision nodes, most if not all the business rules can be captured.  The problem is that using a process notation to capture business rules quickly gets unwieldy.  To capture all the business rules involved in a typical business process, the resultant process model can take up an entire wall and can get hard to decipher and unmanageable.
 
On the other hand, it is possible to implement a business process using only business rule modeling.  Business rules can be unnatural forced to fire in a particular sequence reflecting the steps in a process.  This can be achieved in a variety of ways depending on the rule engine used.  With Rete engines for example, rule priority numbers can be used to force the rules to process in a particular sequence.  Alternatively, artificial interim facts can be introduced into the rule model such that the condition of one rule checks for an interim fact derived by the action of a previous rule.  Of course, what emerges is a rule model which has been unnaturally forced to be sequential.  Such a rule model also becomes unwieldy and difficult to manage.  The process model is obscured into the rules logic and is difficult to decipher and maintain.
 
The trick is to use the right tool for the right job.  Processes modeling can be used capture business concepts which are true processes (a series of steps that must occur in a pre-specified order).  Rule modeling can be used to capture business concepts which are true declarative policies (a set of rules which can fire in any order so long as their conditions are satisfied).  Most often the decision of which modeling technique to use is a clearcut black and white distinction.  But there are grey areas where it is not immediately clear whether to use processes or rules.  An example of this is control flow rules that are typically modeled using process decision nodes.  How sophisticated can these conditions get?  When dealing with these grey areas, it becomes a design decision as to which way to go.  With experience business modelers learn how and when to make these design choices.