Keith Swenson revisits the nuisance of BPMN-BPEL roundtripping and casts the obvious solution – executable BPMN – in the guise of WYDIWYE, what-you-see-is-what-you-execute.  I pretty much agree with Keith on this, but I have found that even though executable BPMN – as (he says) Fujitsu Interstage provides and (I would add) Lombardi, TIBCO, Appian, and others do as well - is obvously the right answer, it’s sometimes not the actual answer in real life.  As in… my company has standardized on BPMN for modeling and WebSphere Process Server or Oracle SOA Suite for execution.  I have two clients right now who fit this bill exactly.

With one of them I have been going through the exercise of BPMN-BPEL mapping, and it’s given me a much better appreciation of the problem.  The problem Keith mentions is from a post by William Vambenepe who bemoans the fact that a BPMN OR-split and join in Oracle BPA Suite generates a slightly more complex looking graph in Oracle BPEL, i.e. a parallel split with an enabling XOR gate on each leg.  I say to that, hey Bill, suck it up.  First of all, it’s not all that complex, and second, Oracle is doing the mapping for you automatically.  So to imagine that that is the problem is to miss the boat on BPMN-BPEL.

In my experience, the bigger issues are these:

1. “Interleaved” flows.  The Pro edition of the BPMN tool we use in our training (ITP Commerce Process Modeler for Visio)  lets you switch validation modes between straight BPMN and BPEL generation.  That can be an unpleasant experience, when you have a simple diagram that gives no BPMN validation errors, switch on BPEL validation and YIKES! a whole page of “interleaving” errors.  The problem has to do with mixing tokens in the flow analysis.  I can’t explain it, but here’s a simple case:

interleave1.png

A credit application comes in.  If the requested amount is high, it goes to manual approval step.  If the amount is low, it goes to a rule engine that assesses risk.  If risk is high, it also goes to manual approval.  If risk is low, it automatically approves (omitted from the diagram) and ends.  Simple, right?  Yes in BPMN, but to the BPEL generator this is interleaved.  The Risk=High path mixes tokens.  Yeah it’s all fuzzy math to me, too, but to fix it here’s what you have to do:

interleave2.png

It’s essentially the same, except there’s a duplicate of the approval task.  Instead of the user task icon it has some other funny icon.  That’s called a reference task, and it means it’s a copy of the original.  So it clutters up the diagram but it removes the interleaving error.  I wish my tool were smart enough to find and fix these automatically, but it’s not.

2. Attached events.  In BPMN an attached event (message, timer, or error) aborts the activity and redirects processing down the sequence flow out of the event, called the exception flow.  BPMN allows the exception flow to be routed anywhere (as long is it doesn’t cross subprocess or pool boundary).  But not BPEL.  In BPEL, the exception flow (called fault or event handler flow) has to return to the end of the activity with the attached event.  Say what?  Yeah really.

My tool handles this automatically, and I thought it was quite clever until I saw that the solution is published in the BPMN spec, appendix A.  It works like this.  BPEL creates a boolean normal completion variable and initializes it to true before the activity with the attached event.  In the exception flow (handler) it changes the variable to false.  Following the activity there is a switch (equivalent to XOR gateway) that enables the following activity (what BPMN calls Normal Flow) only if the variable is true.  This works well as long as there are no parallel paths, no looping back to previous parts of the process, and other things BPMN allows and BPEL has a harder time with.  So in many cases you still need to hand code your BPEL, and the need for hand coding is the real problem with roundtripping.

In the BPEL roundtripping debate, there was a lot of hand-wringing about whether you could automatically create “readable” BPEL from BPMN, meaning the kind of BPEL that you would hand code.  From my vantage point, the bigger problem is the other direction:  Is it possible to recreate the original BPMN from the autogenerated BPEL?  Even accepting those nasty Reference activities, can we get back our original OR gateways and exception flows out of attached events?  I doubt it.  This is why BPEL will, in my view, remain a poor runtime partner for BPMN, at least for BPMN 1.x. 

There is a chance the BPEL vendors now driving the BPMN 2.0 bus will force that standard to conform to the constraints of BPEL.  But unless and until that happens, a BPMN “engine” remains a much better solution.

Tags:

9 Responses to “More on BPMN-to-BPEL”

  1. kswenson says:

    Excellent example! It really makes clear the limitations of a block structured language. It shows well that we are not just talking about a subset of the language, nor are we talking about a lack of semantics of the individual elements, but in fact the details of the engine effect how you can compose element to form a diagram. I think we will see more of this example.

  2. Antoine says:

    Bruce, I would recommend that you take a look at the slides of our talk at EclipseCon last year, from slide 13 to 18. The slide 16 shows the transformation of BPMN to a BPEL tree when a partial merge occurs.

    http://www.eclipse.org/stp/bpm.....2_BPEL.pdf

    Disclaimer: I work for Intalio, Inc.

  3. sebastian says:

    There is one thing you have to consider: Are you aiming at a vertical or horizontal transformation? Horizontal transformation means your BPMN is the executable model, all details are there. If you are doing a horizontal transformation, there is no point in transforming it to BPEL. On the other hand, if you are aiming at a vertical transformation, you are actually doing a refinement of your business process into a technical one. That means, your BPMN process stays platform independent and the BPEL process is platform specific (considering BPEL to be a specific platform). A horizontal transformation approach is a short-term solution and it works as long as you don’t have to deploy your process on another technology. Vertical transformations are more complicated, can’t be fully automated, but are long-term oriented, because you don’t pollute your business process with technology specific details.

  4. bruce says:

    Sebastian,
    Your comment points out I forgot an important clarification. When I say BPMN engine I am talking only about automating the orchestration. The implementation of the tasks themselves (service and user) will and should remain technology-specific. The process “model” does not deal with task internals, only the orchestration. If you accept this, I think it eliminates the distinction between your horizontal and vertical. Or at least blurs it.
    -Bruce

  5. Bruce, you are absolutely correct. Mapping BPMN to block-oriented BPEL is an issue and future revisions in the standards have to look into all such incompatibilities. Moreover you cannot force a business analyst to keep in mind all the strategies and patterns while drawing BPMN diagrams so that they are also BPEL-friendly. The user is least interested in all such executable details and wants to focus only on the business process in hand. Therefore for the moment proprietary runtime engines for e.g. from Lombardi, Appian, Cordys (BPML based) seem to make more sense as they at least allow both business users and IT to work hand in hand which was the prime objective of BPM/SOA wave. Even some of the vendors for e.g. Cordys allows importing/exporting of models in BPEL and XPDL for interoperability. This sounds more reasonable than working on immature standards and get stuck by roundtripping and business-IT handoff. Of course in the long-term one would like to see standards addressing this key issue and tools adhereing to these standards.

  6. Derek Miers says:

    Thanks Bruce – an excellent post (you see I do read your stuff … just dont know where you get the time to create the postings).

    Anyway – I think you nail the key point – “This is why BPEL will, in my view, remain a poor runtime partner for BPMN, at least for BPMN 1.x … There is a chance the BPEL vendors now driving the BPMN 2.0 bus will force that standard to conform to the constraints of BPEL. But unless and until that happens, a BPMN “engine” remains a much better solution.”

    BPMN 2.0 is still a wait and see … as of the last OMG meeting, the two groups are allegedly talking to each other to see how this will pan out. Personally, I am trying to stay out of this fight.

  7. [...] More on BPMN to BPEL von BPMS Watch [...]

  8. [...] Bruce Silver氏がブログでBPELのことを “a poor runtime partner for BPMN” [...]

  9. [...] ブログでコメントし、そのコメントにBruce Silver氏がブログ( その1と [...]

Leave a Reply

You must be logged in to post a comment.