My comment on Keith Swenson’s XPDL-BPEL apples-and-oranges post and the failure of XPDL to fill the vacuum left by OMG in the BPMN specification stirred up an interesting response from Keith that reinvigorates the discussion and helps clear the air.  But he still frames the discussion in terms of portability of executable designs rather than portability of models (i.e. abstracted from implementation details).  In the XPDL vs BPEL discussion, this is appropriate, but in the discussion of BPMN portability it misses a fundamental point.

He says:

Bruce has criticized XPDL for inability to take an executable process from one vendor product, and bring it to another vendor product, and guarantee is it understood. He is right. There is no guarantee that a process drawn in one product, saved in XPDL, will be immediately executable in another product. This is not because XPDL fails to capture the semantics, but instead a failure to (1) be able to unambiguously capture those semantics in standard BPMN, as well as (2) a failure of the receiving tool to understand the same semantics that the sending tool transmitted.

In the first sentence above, replace “an executable process” with “a process model.”  And there you have the essential problem, because I would say BPMN is able to capture the semantics adequately, but BPMN tools simply do not adhere to the spec, and users don’t know how to create diagrams correctly.  The tool vendors’ own sample diagrams violate the spec time after time, something I’ve blogged about repeatedly in the past, and — more important — the tools (the ones I’ve looked at, at least) do not adequately validate the diagrams against the rules defined in the spec.

In trying to prove his point that the semantics required for model portability are missing from BPMN diagrams, Keith unwittingly proves mine instead, that the problem is diagrams often violate the spec and the tools don’t seem to care.   He says:

Lets say there was a product called ?Vulcan Mind-Meld? which used BPMN to express the diagrams that have meaning to this product. BPMN defines what each of the symbols mean, but the real meaning, the real semantics comes from the way that the symbols are composed together. Mind-Meld would guide you as you draw this diagram, making sure that you do not put anything together in a way that is nonsensical. The author of this diagram is making an expression that has meaning in Mind-Meld. Here is a possible diagram which is consistent with the BPMN specification:

 

 

 

 

 

 

 

 

 

Now, imagine the Vulcans had followed BPMN best practices and applied user-meaningul labels to the various activities, sequence flows, gateways, and events, so it would be clearer the conditions under which the process followed one path versus another.  (In BPMN modeling it is actually these labels, not the attributes — those are mostly for BPEL generation — that clarify the process semantics.)  That would go a long way toward clarifying what those Vulcans had in their melded minds.  To the extent it’s still unclear, it’s because this diagram, which even a guy as smart as Keith says is perfectly good BPMN, contains at least 3 errors.

 1. You have 2 sequence flows coming into Casino from potentially concurrent paths.  You need an OR-merge there, or else you potentially have 2 tokens going through the Casino activity for one process instance.  Not absolutely forbidden by BPMN, but best practice to avoid this.  It will break virtually any simulation engine or process engine, and probably not what the user had in mind.

2. Casino, having no sequence flow out, is what the spec calls an end activity.  If start events are used in the diagram (they are here), an end activity must have a sequence flow to an end event.

3. Casino has a Compensation intermediate event with a sequence flow coming out of it.  That’s invalid.  A Compensation intermediate event has an association to a single compensation activity, not a sequence flow.

If I can spot these things easily, why didn’t Keith’s BPMN tool?

For the past few weeks I have been grading exercises submitted by students in my Process Modeling with BPMN training.  My decision to include hands-on with a tool and exercises submitted for grading turned out to be a good one — students say the exercises really drive home how to use BPMN in a way that the lecture material simply can’t.  And what I’ve learned from the grading is that students frequently make diagram errors that could, in principle, be caught by a BPMN validator.  The tool I use, Process Modeler for Visio from itp commerce, has a modest amount of BPMN validation – just enough to make sure the simulation engine can follow the process — and a stricter validation (overly so I think) of diagrams with BPEL export, reflecting more the constraints of BPEL’s block orientation than anything about BPMN.  But almost all the errors I find are allowed by the tool.  If I can see them, surely a validation routine should be able to spot them as well.  This would change the nature of my training, perhaps, but… that’s another subject.

Finally we get to the real reason for this post, which is the long-awaited BPDM — the official metamodel for BPMN from OMG.  You can see it, if you want to, at modeldriven.org.  I was looking for a schema, but instead it’s this funky XMI thing.  It’s not even schema-valid XMI (that’s ironic, isn’t it?).  It fails XMI import as published on modeldriven.org, but if you patch it up with the right root elements — thanks to Marlon Dumas for doing that — you can at least import it into a UML tool.  Yes that’s right, UML.  The schemas that Marlon was able to generate don’t shed much light on what the structure of a BPMN serialization would look like, and that bugged me last week. 

But I think Keith’s post here crystalized the thing that is really bothering me.  It’s not portability of models between tools.  I suppose whether they have to use Eclipse or whatever, the tool vendors will figure out that piece.  What I realize I was actually looking for in BPDM was a more precise statement of the rules of BPMN, so they could be reflected in tool-based validation.  I had the feeling that those rules were somehow buried in the XMI, which I can’t decode, unlike schema, which I can.  But on further consideration, I see that it’s highly unlikely that a schema could possibly represent all the rules, such as if you have this kind of flow object over here, that constrains what is allowed for this other flow object over there.  Of course, if you had a schema you could write XSLT that would do the validation based on rules extracted from the narrative of the metamodel.  But that’s a story for another day.