More on eClarus and Class 2 Roundtripping
October 13th, 2006
Re yesterday’s post, Yi Gao of eClarus wanted to get this image in his response, so I’m posting the following note on his behalf.
From Yi Gao, Oct 13, 2006:
In eClarus Business Process Modeler 1.0 that was released in June, we could translate the BPMN models with synchronization links. We had some samples that show the capability even though we did not explicitly categorize the models in our website.
The simply structured BPMN models defined as Class 3 can be translated to “readable BPEL” using context-free pattern matching. The technique is similar to computer language parsing based on a finite number of production rules. However, with synchronization link, the context-free pattern matching is not sufficient.
Let me use the following diagram to explain. Without the sequence flows in red and gateway G5 and G6, it can be translated using the pattern matching algorithm.
1) A-B-C-D-E => BPEL Sequence “P1”
2) H-I => BPEL Sequence “P2”
3) G3-(P2 | J)-G4 => BPEL Flow “P3”
4) F-P3-K => BPEL Sequence “P4”
5) G1-(P1 | P4) => BPEL Flow “P5”
(click image for a clearer view)
With the synchronization links, if you try to use the same technique, you need define an infinite number of patterns (production rules) since there are infinite ways to synchronize your activities. However, if you can identify those synchronization links, you can solve the problem by imaging they do not exist first, then adding the BPEL links to flow “P5” after pattern matching translation.
We have an algorithm to identify those synchronization links by analyzing the flows. It is much more sophisticated than described in the example above. And it will be incrementally enhanced to cover more cases.
The mapping algorithm is no longer context free. In other words, you cannot figure out G3, H, G6, I, J, and G4 can be mapped to BPEL flow without looking at a larger scope. So flow analysis is necessary.
In BPEL 1.1, the semantics is clear on “Suppress Join Failure” and “Dead Path elimination”. But it is not that specific in BPMN 1.0. So we intentionally disabled the translation for some models until the specification is clarified in the future. But the algorithm itself is capable if BPMN can align with BPEL on those concepts.
Our goal is to solve real business integration problems. Some patterns in the research papers are very meaningful from academic point of view, and the conclusion can provide guidance for commercial implementations. However, some in Class 1 can be easily solved by adding BPEL extensions, including discrimination pattern, multiple-instance loop, etc. If there is a real need in today’s business, they will be added to BPEL implementations, and even future BPEL specifications. Oracle BPEL extension “flowN” and “exec” are good examples.
Entry Filed under: BPM


8 Comments Add your own
1. bruce | October 13th, 2006 at 5:38 pm
Yi,
My question would be this. If you made some (reasonable) assumptions about the synchronization links, could you then redraw the BPMN as an unambiguous (class 3?) diagram so the business analyst can verify -” yes, that’s what I meant” ? My takeaway from this discussion, as far as I can follow it, is that these problem class 2 diagrams can be turned into unambiguous (class 3) diagrams if you can get the analyst to commit to what he means. So if your tool can help that along, it would be very welcome. Or am I missing the point entirely?
2. ygao | October 13th, 2006 at 6:38 pm
Bruce,
Your understanding is right. Currently, our tool can do the mapping behind the scene. You won’t see any analysis results in our UI even we can do it.
If you want to translate the sample I gave to a “readable BPEL”, I believe the result BPEL is the only choice users expect.
To draw a Class 2 diagram, most people draw a class 3 one first, then add the synchronization links. For such a diagram, our tool can accurately find the links. And there is only one possible result.
However, if we draw a diagram with parallel processing, and just care about the execution order, the result diagram may have different choices to be turned into a class 3 diagram. In this case there may be a need to allow the business analyst to choose. But most time, I guess, the business analyst doesn’t care since his BPMN diagram is not as “readable” as we discuss here.
In either situations, the generated BPEL is semantically equivalent to the BPMN diagram.
3. bruce | October 13th, 2006 at 9:31 pm
Just to make it clearer to “concrete thinkers” like myself, could you post the class 3 equivalent to your posted class 2 diagram, based on one reasonable assumption about what the business analyst meant? Even though your tool creates the correct BPEL behind the scenes, there is also value in showing business analysts how to draw less ambiguous diagrams that have the same process semantics.
4. marlon_dumas | October 15th, 2006 at 6:05 pm
Hi Bruce,
The example that Yi has given is interesting, because it is an example of a class 2 model that can not be re-written as a class 3 model (i.e. a fully structured model). So don’t try asking for the “equivalent” class 3 model, because it ain’t. When mapping this example into BPEL, you’ll need BPEL control links (or other advanced constructs) to capture it, because combinations of “flow” and “ifthen … else” won’t do the job. This follows from a theorem that was proven mathematically by some people in our group a few years ago. If anybody is interested in the mathematical details, they can refer to:
http://tinyurl.com/yjexff
[Note that in this paper, an ad hoc notation is used because at the time the paper was published (early 2000), BPMN did not exist. So bear in mind that what the authors call "or-split" and "or-join" in this paper, you should read it as "XOR decision gateway" and "XOR merge gateway" in the BPMN terminology. Also, "AND gateways" are denoted by little filled circles, while "XOR gateways" are denoted by little white circles.]
In any case, let’s retain that the example that Yi posted is definitely a class 2 model!
The technique that Yi sketches looks interesting. But the devil is in the details… When Yi says: “you can solve the problem by [imagining] they do not exist first, then adding the BPEL links to flow “P5” after pattern matching translation”, there’s is a lot of black magic behind and one has the right to be skeptic that this technique will actually work when confronted with say 1000 clients trying to translate their BPMN models into BPEL (if such a thing ever happens!).
Of course, Yi will probably not disclose the details of his mapping because that’s valuable intellectual property for his company (assuming of course the technique works in real-life scenarios). So perhaps what we should do is not discuss at the level of techniques or algorithms, but rather at the level of tools and examples.
We have recently made available, in open-source, a tool that can translate BPMN models into BPEL processes. In this tool, class 3 models are translated into BPEL structured activities, class 2 models (or fragments of models) are translated into BPEL control links, and all other (class 1) models are translated into BPEL event handlers. There is no reverse mapping at the moment, so we can’t talk about round-tripping yet. The tool is available at:
http://www.bpm.fit.qut.edu.au/projects/babel/tools/
It’s call BPMN2BPEL. There are some examples that come with the tool (you can download the file called “Examples.zip”) from the above web page. One of the examples is called “orderFulFillment.bpmn”. The file is in XML format, but graphical equivalent of this example can be found here for your convenience: here, and a narrative description follows:
“This is an order fulfillment process seen from the customer perspective. The process starts by making a choice between two conditional branches, depending on whether the shipper supports the Universal Business Language (UBL) or the Electronic Data Interchange (EDI) standard. The choice between these two standards is exclusive and EDI is always the default one to choose. If UBL is used, the process needs to receive both the despatch advice and the invoice from the shipper before it can continue. Alternatively, if EDI is used, the process needs to receive both EDI 856 for the Advanced Shipment Notice (ASN) and EDI 810 for the Inovice before it can proceed. Next, upon the receipt of either EDI 810 or the invoice (formatted in UBL), a payment request can be sent to the shipper. Once the payment request has been sent out and either EDI 856 or the despatch advice (formatted in UBL) has been received, the customer sends the fulfillment notice and the process completes. ”
The BPMN2BPEL tool can translate the above example into a BPEL process definition that contains lots of control-links. Arguably, a “better” translation can be found (in fact, this model can be turned into a class 3 model if you twist it around a bit). I would be curious to know what the upcoming version of the eClarus tool does about with this model.
Now, stepping back a bit from the details, all that this discussion points out is that mapping BPMN models to BPEL process definitions is not as simple as many people would like it to be. The BPMN folks know it all too well, since in their description of the BPMN to BPEL mapping (see appendix of the BPMN spec.) they leave many issues open. So the question is then: Are we heading in the right direction by even thinking about mapping ANY BPMN model into a BPEL process definition? Academically, it is a stimulating exercise, and hopefully something will be learnt from it. But in the meantime, maybe Bruce’s advice is worth considering: “there is also value in showing business analysts how to draw less ambiguous diagrams”, or put it otherwise, there is value in making things simpler right from the start, so that they do not become complex down the track. That is why I think more effort should be put into defining “classes of BPMN diagrams” that remain simple, and tool support or guidelines for drawing diagrams that fall within these classes.
5. ygao | October 15th, 2006 at 10:41 pm
As I stated in my white paper, not all BPMN diagrams can be mapped onto BPEL processes isomorphically. So it is impossible to get the same diagrams after round-tripping without cluttering the BPEL files with annotations or equivalents. However, those diagrams that can be isomorphically translated cover the most real use cases. They are a reflection of what BPEL can do.
Comparing with Marlon’s classification, isomorphic diagrams are a subset of Class2, but a superset of Class3. Class 3 can be translated to BPEL using context-free pattern matching algorithm. However, the algorithm is not effective for diagrams of parallel processing with synchronization links, which belong to Class 2 and are common use cases One example is shown in my previous post. It can be isomorphically mapped onto BPEL constructs. That is what eClarus product can solve.
Some diagrams in Class 2 cannot be mapped isomorphically onto BPEL. Please look at this diagram. It is semantically equivalent to the one in my previous post. In this case, we can edraw the diagram as an isomorphic one, and then translate it to BPEL. Fortunately, we tend to draw the diagram structurally
since it is natural for us to decompose a complex problem into small pieces.
Practically, you can first draw a parallel processing diagram using Class 3 components, and then add the synchronization links if any. eClarus product can translate it to a "readable" BPEL using its advanced algorithm.
Also I want to clarify the my previous post on our algorithm. In the diagram, without the synchronization links, it is a Class3. and it can be mapped to a "readable" BPEL using the algorithm Marlon mentioned. After the Class3 mapping, we add the links to the result BPEL.
6. ygao | October 15th, 2006 at 11:58 pm
Marlon,
It seems that your picture link is broken. Based on your sample XML file, I draw the diagram using our tool. see the diagram http://www.flickr.com/photos/68312898@N00/271061115/
My guess is that your tool translates it into a big flow that all execution controls are based on BPEL links. For this type of diagrams, we did the same thing. The example we gave is loan approval from BPEL spec.
However, if you use the same technique to translate the example in my first post, the result BPEL is far less “readable” than what we generate.
When we do mapping, we are thinking from BPEL developers’ perspective. If he thinks in the way of the orderfulfillment diagram shown, he probably creates a BPEL as a “big” flow. But if he draws a diagram as I described in my previous post. He will definitedly prefer our approach.
7. marlon_dumas | October 16th, 2006 at 1:49 am
Hi Yi,
Sorry for the broken link. Now I’ve corrected it:
http://sky.fit.qut.edu.au/~dumas/orderFulfillment.png
It’s not exactly the same as the example that you posted at http://www.flickr.com/photos/68312898@N00/271061115/, but it’s quite similar.
I understand that your approach is to find certain “patterns of process components”, and when you find those patterns, you translate them into a combination of structured actiivites and control links (when possible). On the other hand, if you don’t find any pattern in the process model, you translate into a “big flow” with control links inside, or try to transform it into a structure you know about. This is similar to the approach used by Kristian Lassen and Wil van der Aalst to translate Protos models to BPEL (Protos is a process modelling tool that uses a notation inspired by Petri nets):
http://tinyurl.com/yz9fky
The authors of this paper say that they had to identify 76 different patterns of process model components to be able to translate 100 sample process models. It would be interesting to know if we can find those 76 patterns of BPMN components (or perhaps more), that would be able to cover say 90% of the cases.
As you note, the bottom-line is that BPEL has many syntactic limitations because it attempts to avoid as much as possible models with deadlocks, livelocks or ‘unintuitive’ execution semantics such as: http://sky.fit.qut.edu.au/~dumas/UnstranslatableBPMN.png
So any approach to translate BPMN to readable BPEL code will have to consider a number of different cases, thus this approach of identifying “patterns of BPMN process components” and defining mappings for such components is indeed a natural one. Ultimately, it’s the approach behind eClarus and behind BPMN2BPEL.
In any case, among the commercial tools that claim to be able to map BPMN to BPEL, yours would be the only one I’ve seen which attempts to deal with non-trivial BPMN models while emphasising the readability of the generated BPEL code. Good luck!
8. marlon_dumas | October 27th, 2006 at 1:55 am
For those interested in deep technical details, the algorithms used in the BPMN2BPEL tool are now available here:
http://eprints.qut.edu.au/archive/00005266/01/5266.pdf
And the latest version of the tool, including source code, is always here:
http://www.bpm.fit.qut.edu.au/projects/babel/tools/
Leave a Comment
You must be logged in to post a comment.
Trackback this post | Subscribe to the comments via RSS Feed