How to combine Workflow and Business Rules – in 5 easy steps

Tom has a good post on the jBPM (JBoss workflow) community day held at the Guinness brewery in Dublin. Warning – slides may contain pictures of people drinking beer.

Drools jPBM Business rules presentation

How to combine (jBPM) Workflow and (Drools) Business Rules – here’s the summary. Slideset is available on this blogpost.

  • Workflow (e.g. JBoss jBPM) is great – it allows you to take spaghetti code and draw it as a workflow diagram (flowchart) so that it can be reviewed by the business (the nice people who pay our wages). You then attach standard (Java) actions to these steps.
  • Only problem is when you come to a decision node (the one circled in red below): How do you decide to go left or right (in the workflow)? Normally this is coded in Java – good for us, but hidden from those nice business people (which means that this is more room for errors-in-translation).
  • Business Rules allow you to keep those decision making rules in Plain English: When something is true , then do this. That’s it. The rule engine does most of the hard work.
  • Integrating Workflow and Rules is easy. Use JBoss Seam (link) or do it by hand (link). And it works on non-JBoss web / app servers such as Websphere, Oracle Application Server, Tomcat and Weblogic.
  • Repeat x6 : Use workflow and rules. Use workflow and rules …

Simple Workflow

In a maybe related development, Tom Baeyens is now using strangely Rules-y like examples over on his workflow blog ….

6 Comments

  1. James,

    That’s a good post – although I’d come at the problem from a slightly different angle , probably due to the different nature of consulting that we do!

    I think your post focus is on changing manual decisions (requiring human intervention) to automated ones.

    My main focus in the talk was taking existing automated decisions coded in spaghetti (what Java looks like to normal people!) to something that can be reviewed by business decision makers.

    Both are two sides to the same coin, and both require balance – just because you *can* automate a decision doesn’t mean that you *should*. In both cases you end up with a better, clearer, system.

    Paul

  2. Yesterday I have attended a discussion on ILog Jrules organized by Twin Cities Java user group.

    I can say from my previous experience of Drools that Rule engines are must in your company if your business model requires frequent changes and quick turnaround time. But the business people are doubtful as usual because they don’t see the virtue of the rules engines upfront.

    I think just to demonstrate them the virtue of a rule engine projects should demonstrate them using some open source solutions like Drools. After the first cut if required they can go for commercial solutions like JRules or Blaze Advisor etc

  3. I can say from my previous experience of Drools that Rule engines are must in your company if your business model requires frequent changes and quick turnaround time. But the business people are doubtful as usual because they don’t see the virtue of the rules engines upfront.
    +1

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 )

Facebook photo

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

Connecting to %s