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 ….

JBoss Business Rules and jBPM Workflow presentation – Dublin

Update: Shortcut to slides (pdf, with notes following) here.

Speaking at the JBoss jBPM community day tomorrow and I’m nervous. I’m nervous because I’m standing up and talking to a group of people that really know their stuff about JBoss workflow. And talking about a project (JBoss Business rules) which has a friendly rivalry with it.

jbpm logo

So here goes

  1. Slides in Powerpoint emailed to myself (check)
  2. Slides in PDF available online (check).
  3. Slides in Open Office on laptop ready for presentation (check)

Drools Logo
More details on the jBPM wiki if you’re interested in attending the event. Anybody give odds on the laptop bluescreen again (like what happened at the Irish Java Technologies Conference)? It’s not what happens, it’s how you deal with it.

Business Rules without Java

I like this sample as it explains what Business Rules are, in a way that professional (i.e. non technical people) can understand. This one I originally posted on the O’Reilly Java and JBoss Drools blogs. If you were around in Dublin last month, you’ll notice that it’s also the sample that I talked through at the Irish Java Technologies Conference.

Like many countries, the Health services in Bangladesh can’t get enough doctors. Training more is not a solution ; Qualified doctors often leave for better pay elsewhere. Given the urgent need for trained medical staff in rural areas so save lives (often children dying of curable diseases), what are health workers to do?

The solution that the Health workers came up with was IMCI – or Integrated Management of Childhood Illness. It takes what the Knowledge in Doctor’s head’s and stores it as a simple guide that health workers can follow. When a sick child is brought into the clinic the health worker is able to follow the simple step-by-step instructions to make quite a sophisticated diagnosis.

I’ve no medical training beyond simple CPR (and if you’re relying on that then you’re in real trouble) but even I can understand it.

imci.jpg

Look at the pale blue box in the diagram above. It’s a set of medical rules: Are there any danger signs? What are the main symptoms? What combination of these symptoms are there? What is the age of the child? How long have they been ill? Depending on the outcome of the rules, go to the next set (the pink / yellow /green) boxes and apply the rules that you find there.

That’s Rules and RuleFlow.

  • Rules are ‘when something is present , then do this’. And not just single rules, but many of them. Together, loads of simple rules allow you to come up with quite a sophisticated diagnosis.
  • Ruleflow allows you to group your rules. If you’re a health worker with a sick child you want to do the most important checks first. Depending on the outcome, you then apply the next set of medical rules: Pink if they need urgent referral to the hospital, yellow if the clinic can cope , or green if the child can be looked after at home.

As gory as it sounds, everybody, including the doctors, are happy that their ‘brains have been put into a PC‘ (or in this case , a set of paper cards). The Doctors are happy because they can (guilt free) move to better paying jobs. The medical workers using the system are happy because they can help the sick children that they see every day. And the children gain because the better availability of medical knowledge (via Rules and RuleFlow) is literally the difference between life and death.

Irish Java Technologies Conference – Live

I’m dipping in and out of the presentations at the Irish Java Technologies Conference (IJTC Dublin), so I’m not going to get to see the top 10 speakers. I will update this as it goes along, but my notes on the conference so far are ….

  • Bernie Goldbach came all the way from Tipp on the off-chance that he would get 3 minutes with Joel Spoelsky. Given that it’s a 4 and half hour round trip, I’m glad that he got his interview.
  • Joel, as ever, was a very good speaker. His message for software developers; soft rounded corners matter. Think iPhone instead of Samsung brick.
  • David Syer of Interface 21 was talking about what’s next for Spring (2.5 and 3.0). A lot of good stuff coming up; support for the latest Java Enterprise specs, Webflow , OSGi (deploy bundles , not applications), configuration using annotation instead of XML
  • Shaun Smith of Oracle. Covering building JPA Applications (Java and Databases) using Eclipse and Java. Now, I’m not a great fan of Toplink (I prefer Hibernate) , but the open source work including the work on the Eclipse IDE , and it’s support of the JPA (Java Persistence Architecture) standard, and it’s ability to transform Java Ojbects into loads of things (e.g. XML instead of Database Tables) is making me want to take a 2nd look.
  • Caught talking in the Lobby : Shaun of Oracle Toplink and Emmanuel Bernard of Hibernate. I was vaugely disappointed these two didn’t come to blows (being from rival projects). There were actually nice to each other and exchanged business cards. Fascinating conversation though …
  • James Strachan , Iona and Apache, speaking about messaging patterns. He takes the bean soup that is messaging and integrating your applications and makes it seem really simple. He’s also talking about Apache Camel, ActiveMQ and ServiceMix

Other People Blogging about this:

Links to our JBoss jBPM (Workflow/ Business Process Management) presentation slides to follow shortly …

Top 10 Speakers at the Irish Java Technologies Conference (IJTC Dublin)

Not (too blatant) a plug for the Irish Java Technologies Conference (IJTC). Although if you’re around Dublin on the 7th / 8th / 9th November I’m told you’re more than welcome to drop in. This post is more a quick review of the people who are speaking. It’s also an invitation to check out their websites and see if any of the technologies they are promoting could be of use to your project.

Dublin Jug Logo

Here are the top 10 projects that I’m looking forward to checking out.

10) Java and Microsoft SQL Server : It’s still a brave Microsoft person that comes to a Java conference. Shows MS recognition a substantial amount of Java deployments persist their Data to a SQL- Server database.

9) Eclipse STP (and SOA) – Service Orientated Architecture is the buzzword of the year. If anybody can put substance behind the hype , it’s the guys From Iona.

8) Eclipse JPA and Dali. Hibernate pushed Object Relational Mapping (ORM) to be the standard approach to database access. The manager of the ‘other’ ORM Project (Oracle Toplink) should give a interesting coverage of the tooling developments.

7) Apache Geronimo – by Jeff Genender from Apache Foundation. So long the ‘other’ Open source application server, this is now becoming credible in commercial deployments.
6) Java Update – Simon has been working as a lead Java consultant for Sun Microsystems. He’ll be talking about Java Standard Edition 6 and Java Mobile Edition. But what I’m really interested in is Java Enterprise Edition 5, Scripting, Java Realtime and Java FX.

5) If scripting is your thing fellow Onjava Blogger Dejan Bosanac is also speaking on this subject. He’s talking about Scripting within the JVM, which will be one of the hot topics for 2008.

4) iPhone v JMME – I don’t get the buzz around Mobile (give it another 18 months , we’ll all be running Java Application Servers on the mobile). But many people are interested in it – this talk is how to make you Mobile Java apps as slick as those in the iPhone.

3) JBoss Drools Engine (Drools)I’ve blogged (a little bit) about Drools before. I’ve also been fortunate enough to hear Mark Proctor speak and you will come out an convinced that the natural home for Business Logic is in the Rule engine.

2) JPA and Hibernate – There is a very strong possibility that Emmanuel Bernard will be returning to Dublin to talk about the Hibernate project that he leads. Having seen his recent talk, and given the level of interest in Hibernate, I expect a strong turnout for this one.

1) Spring 2.5 – Spring has been around for more than 5 years and is making serious inroads in the the Enterprise Java community. Sam Brannen (from Interface21) will give details on the latest on the major update to Spring (2.5) as well as what is planned for the future.

Disclaimer: I’ll be talking about Java Workflow (based on on JBoss jBPM). But compared to these guys, I’m way down on the Z-List of presenters.

Other People Blogging about this:

Business Rules (Drools), Workflow (jBPM) and Seam – anybody want a training session?

We’ve given Enterprise Java Training, Struts 2 Training (the most widely used Java-Web framework), and now it’s the turn of JBoss Rules (Drools) , Workflow (jBPM) and Seam. A lot of the material is coming from the forthcoming Masters Dissertation on Enterprise Web 2.0:

The course (summary below) is a private session. If there’s enough interest I’ll setup a public training session, or cut it back to 1 hour and do it as a ‘free’ intro session.

If you can’t wait for that, Mark Proctor’s blog has a lot of useful rules information, and Tim Shadel has the pdf of a presentation that he gave in Phoenix Arizon on his blog.

JBoss Rules Logo

Knowledge and Process Management

JBoss Rules, jBPM and Seam

Executive Briefing

Description:
S
uccess or failure in your business depends on dealing with information faster and better than your competitors. This briefing shows you how the JBoss Business Stack (Rules , jBPM and Seam) can do this and how to apply it to your organisation. Crucially, the briefing shows you when not to use these and details the alternative approaches.


The briefing will give delegates an overview of JBoss Rules within a web / enterprise development environment, how to architect an distribute rules within multi-tier applications and how to link these components with existing sources of information using Enterprise Application Integration (EAI).

Audience:
This Briefing is suitable for IT Managers and Directors, IT project managers and technical staff who need an insight into the latest JBoss technologies and business processes, and business managers who need to be aware of the new application models and to give buy-in and commitment to applications developed within it.

Duration:
Half-day

Objectives:
On completion of this Briefing, delegates will:

  • Understand the benefits JBoss technologies offers your business and the key areas where it should be used.



  • Know how to successfully use JBoss Rules, jBPM and Seam with new and existing systems and technologies, including the use of Enterprise Application Integration (EAI).



  • Be able to boost projects using pre-built components and frameworks and be able to choose the right one for their needs.

  • Be aware of the main precepts of good application design within the Java component framework, as well as knowing the main Enterprise Java architecture components, terminology and acronyms and their interaction.

  • Understand how end-to-end applications are built using the JBoss frameworks (Rules, jBPM, Seam) and appreciate their organisational impact.

Presenter Biography

Paul Browne has 13 years experience delivering IT Projects in the Financial, IT/ Telecoms, Pharmaceutical and Public sectors. An author on JBoss Rules for O’Reilly Books, he has delivered courses for Limerick Institute of Technology, Siemens, Dell, Trigraph and IACT. Holding a Degree in Business from UUC, he is awaiting conferral of an Msc. in Advanced Software Engineering from UCD.

Briefing Content

Introduction and Problem Space

  • Delegate introduction

  • Trainer introduction

  • Course introduction

  • The problem we are trying to solve

  • Who is JBoss

  • 3 Tier Applications

  • What is a rule engine

  • Alternatives using Java

  • Alternatives to Rules

  • Alternative Rule Engines

  • Section Summary / Intro to next section

Rule Engine overview

  • Business Rules (examples)

  • Sample Business Uses

  • If then statements – can we do better?

  • Rete Algorithm

  • Forward and Backward Chaining

  • Domain Specific Languages (DSL)

  • Decision Tables (what the user sees)

  • Decision Tables (for the Developer)

  • Rule Editors

  • JBoss IDE (Red Hat Tools)

  • Advanced Rule Language

  • System Development Roles

  • Section Summary / Intro to next section

Integration and Deployment

  • Web environment

  • 3 Tier system

  • Integration with Spring

  • Integration with EJB

  • What is workflow

  • What is jBPM

  • What is Seam

  • Seam and JSF

  • Seam and jBPM

  • Drools.Net

  • Section Summary

  • Course Summary and Feedback

Business advice : Don't be Dustin Hoffman

Do you remember Dustin Hoffman in Rainman? He was an idiot-savant (not the PC Term) that was a genius at Mathematics, but had talent for little else. Too often we’re like that – genius in our own niche (IT, Law, Sales, Marketing, Finance) but useless outside of it.

ShareIT is an attempt to break outside of these niches and share useful knowledge in the small business sector. The slides below are from the first ShareIT event in Cork (held last week), with a follow up event in Dublin (Microsoft Campus) on April 28th.

Jenny Kent How to be an effective communicator – Slides.
Key Point:
Plan what you want to say, say it, then listen.
Conor O’Neill Outsourcing – Slides
Key Point:
You can outsource (almost) anything , but communicate, communicate, communicate.
Krishna De Marketing Matters for Tech Startups (slides to be released)
Laurence Veale Writing for the web – Slides
Key Point: Keep it simple.
Donagh Kiernan Sales Generation- Slides
Key Point:
Everybody sells; work hard to understand what your customer needs.
Richard Hearne Search Engine Optimization – (email Richard for the password to Slides)

(Updated with links to the Dublin Event)