Posted by: Carole-Ann | August 24, 2010

Business Rules in or out of BPM?

Mark Norton commented on my algorithm post and inspired this follow-up post on the combination of BPM and Business Rules.

The debate on whether one should implement Business Processes or Business Rules has been raging since the late 90′s…  It seems that both sets of players have finally come to terms with its role and how they can collaborate but I still see a few confused heads.

All BPM or All BRMS?

BPM vendors used to advocate that business processes are meant to encode both routing and decisions.  BRMS vendors used to say that a rules service can define all decision logic (i.e. the rules) as well as the sequencing of those packets of rules (i.e. the ruleflow).  In short they agreed that you only had to use one tool but they disagreed on which one.

Le Tour de France: A long-running transaction with a very precise flowDebunking the All BRMS story

It does not take much to argue against that perspective…  When the process at hand runs longer than a single hit-and-run transaction, rules services will cause you more trouble than they are worth.  A long-running transaction, by definition, stops and hangs there.  It could be due to an awaited human intervention, an asynchronous call to a remote system like a DMV (Department of Motor Vehicle) or a Credit Bureau, or simply a failing call to a local service that is gracefully handled in your system.  You want this transaction to patiently wait for the answer before you keep processing it.

The problem is that rules services are not well-suited for waiting patiently.  Granted, a software architect can decide to deploy that service as a stateful service — not that many like that design.  A stateless service could possibly be used like a state machine with careful design — which we have done on a few occasions when a BPM implementation was not an option.

Here is an analogy that may help.  Le Tour de France is full of decisions — Who gets the yellow jersey?  Who gets Polka-dots?  How much doping is too much?  That being said, the route is like a process flow.  You could use business rules to decide which destination to head next but you’d be at the mercy of a system crash, or you would have to design your system to archive the progress as you go.

The fact is BRMS are good citizens of the App Server that hosts them but you don’t want to manage the overhead of those long-running transactions all by yourselves.

Traffic Light Analogy Gone AwryDebunking the All BPM Story

BPM does a beautiful job orchestrating services and systems.  The long-running transaction is fully taken care of.  The difficulty comes from the maintenance of the decisions embedded into the said process.

When the decisions become somewhat complicated, you see yourself adding a path here and there in your flow.  No big deal.  Until it become unmanageable: too many links, too many nodes.  In the gigantic stack of spaghetti links, you have a hard time visualizing what the process is meant to be about.

The famous traffic light in London is the perfect analogy.  One traffic light is pretty simple, even my 3 year-old got it a while ago: Green you go, Yellow you slow down and Red you stop.  The thing is, as complexity grows, you make get confused when facing the “simple” traffic light concept multiplied by a few dozens.  Same thing happens when your simple nodes and links get multiplied to create a messy mesh like that traffic light in London.

The trick here is to find out where the fine line lies

You need to find the perfect balance of process and decision.  Think about what each part is really about:

  • what is about the various systems & people the transaction must hit, the red tape and the milestones to reach
  • what is about the decisions that may vary as a result of regulations or competitive strategy changes

Those tend to change at a different pace, they tend to be subject to different constraints, they tend to be owned by different stakeholders.  So when you are on the job, it may not be that difficult to draw the line when you put your head to it.


Bookmark and Share


Responses

  1. Hi Carole-Ann, this seems the perfect place to reuse your great turn of phrase, ‘violent agreement’. Just thought I would add a perspective on the granularity of process and how it relates to decisioning. Your traffic light example provides useful context. My view is that the BPM approach would focus more on analysis of the paths through London, each of which is defined by a set of traffic lights. If you look at the paths (the processes) and try to identify the traffic lights involved (the decision points), you quickly create a ‘messy mesh’. If on the other hand you focus on the decisions, I believe the paths will become much simpler, perhaps even irrelevant. For instance, if each set of lights optimizes itself according to its own strategic priorities, the paths will be inherently optimized – as traffic builds up in one direction, each set of lights will adjust and prioritise accordingly.
    How does this apply in business processes? The parallel is that business decisions should operate equally independently of the processes. For instance, calculating a customer discount on the basis of prior sales might occur within zero to many different processes, but each process need have no knowledge of the calculation (and visa-versa). Even the fact that the calculation is participating in the process can be controlled by process level decision making and not explicitly known to the process. This approach reduces processes to being a set of capabilities that are invoked by decisions in response to an event. The exact nature of the process response is unknown until the decisions are made. If the decisions are properly defined, the whole complex will work. I have personally implemented this approach using both ESB and/or data driven ‘state machine’ architectures. A far cry from laying out business processes like a map of London, but this approach avoids the whole issue of trying to deal with the ‘messy mesh’.
    Back to the traffic lights: London is actually built up piecemeal by individual street and traffic light installations. Point-to-point paths are then derived from the available street network, and routing (process) recommendations can be made – the actual preferred path from point A to point B might change according to many characteristics (time of day, traffic flows, urgency, cost, etc). If London was to be designed BPM style, we would be still analyzing the thousands of paths that we ‘might’ need, and trying to overlay them onto a ‘messy mesh’ for implementation. I suspect Londoners would still be walking across muddy fields.
    Regards,

  2. Mark, this is a great point. Thank you for adding to the traffic light metaphor.

    Food for thought: a study revealed that taxi drivers in London had a disproportionate hippocampus, that is directly correlated with the complexity of the irrational city map they have learned to master. The post referenced below indicates that different parts of the brain are responsible for different activities such as planning the path through the roads or reacting to unexpected roadblock.

    Does that suggest that different technologies would be appropriate for different purposes in our London navigation project? Does that suggest that something more complex than knowledge we can explicit could be more effective at optimizing paths? Analytics comes to mind – neural networks are experience-based hard-to-explain decision structures that can be extremely effective when our brain hasn’t had a chance to get around a given problem.

    Read more:
    http://bit.ly/bcyRzr

  3. in Mark’s exampe: neither BPMS nor BRMS have any business calculating the customer discount; it should be handled by a core business system (ex: pricing module). When the process model becomes messy there is a big chance process designers has rammed too much stuff into what essentially is orchestration.

    • DK,
      I don’t think its as black and white as you suggest. I think there are times when its appropriate to use a BRMS because the discount or the pricing structure fits this model and I think there are times such as rating for P&C insurance that are better served other ways.
      We definitely agree that it should be a service. I’ll reserve opinion on who should invoke that service, maybe rules and maybe BPM. I don’t think that’s all one way or the other either.

  4. You’re right. A Pricing or Rating system could be involved in real-life application. I believe that Mark implied that the discount was calculated as a service though — a decision service i.e. BRMS. The independence of process and decision is actually an important feature of a good design.

    The main point is that process designers can “ram too much stuff” as you say. Many rules can be easily pushed into the process. You may have heard the term “dirty flows”. It is key to separate the process (or orchestration) from the point decisions (like discount calculation, knock-out rules, product recommendation, etc.) so that they can easily assembled and reused.

  5. [...] BPM and Business Rule Management – Carole-Ann BPM does a beautiful job orchestrating services and systems. The long-running [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

Follow

Get every new post delivered to your Inbox.

Join 51 other followers