Monthly Archives: December 2014

Exporting diagrams from Bizagi to Activiti Designer

Activiti comes with two modelers, eclipse based and web based. Activiti does not promise NO-CODE workflow and modelers are also designed having a developer as user in mind, specially the eclipse one. One can easily forget about eclipse based designer when trying to use it to discuss a business process with a domain expert or a business analyst. They need some more graphical tool than eclipse.

Bizagi is a robust clean free tool for such purposes. One can use it easily to draw a conceptual BPMN diagram and even simulate it in some extend.

But what if you decide to execute the model using Activiti ? In older versions, it was not possible to reuse the diagram available in Bizagi. The whole process diagram needed to be recreated in activiti from scratch, blank paper style. The most recent version (I am using version 2.5 for this test), supports exporting BPMN diagram to various formats including BPMN. This format is what activiti uses by default. So theoritically it should be possible to open the diagram created in Bizagi  inside eclipse based designer and edit it there.

But they do not funtion always as advertised. I did a short test to check how possible it is.

First of all, it is important to notice the two tools serve more or less different purposes. Activiti designer cover all the detailed required information to really execute the model by its own engine. Diagram in Bizagi is more a conceptual diagram and lack those details. So obviously in best case, the converted diagram is not executable. Only the base structure will be converted and all the details, class named, error codes, and so on should be added manually. Not ideal, but way much better that redrawing every thing from scratch.

Exported diagram can be opened in Eclipse designer and usually the basic patter nis readily visible. It is fine as long as you have not tried to edit something. The smallest change and save makes the whole disagram be unreadable the next time. The reason is that for any reason activiti does not understand the Collaboration semantics produced by Bizagi. Whose fault is it, should be checked and fixed. Activiti designer only uses it for graphical representation after all, no effect on the execution.
So one workaround is to delete the whole content of <Collaboration> tag as first step before trying to save the diagram.

The above trick makes the diagram editable in eclipse designer. Most of the commonly used BPMN elements are compatible from Bizagi to Activiti, but not all of them. I did a quick test on what is supported and what is not and here is the result:

UnSupported BPMN Elements:

  1. Subprocess
  2. CallActiviy
  3. Shell Task
  4. Camel Task
  5. Mail Tasl
  6. Error Start Event
  7. Cancel End Event (NPE, probably eclipse bug)
  8. Multi instance (Both Parallel or sequential)

Supported BPMN Elements:

  1. Start Events:
    • None Start Event
    • Timer Start Event
    • Message Start Event
    • Signal Start Event
  2. End Events:
    • None End Event
    • Error Event
    • Message End Event
    • Signal End Event
  3. Boundary Events:
    • Message boundary event
    • Error Boundary event
    • Signal Boundary event
    • Compensate Boundary event
    • Intemediate events::
    • Message boundary event
  4. Intemediate events:
    • Intermediate Message throwing event
    • Intermediate Message catching event
    • Intermediate Signal Catching event
    • Intermediate Signal Throwing event
    • Timer intermediate event
    • Signal throwing event
  5. Sequences:
    • Sequence Flow
    • Conditional Sequence Flows
  6. Gateways:
    • Exclusive gateway
    • Parallel gateway
    • Inclusive Gateway
    • Event based Gateway
  7. Tasks:
    • User Task
    • Script Task
    • Service Task
    • Receive Task
    • Manual task

Update in Web Service Mock demo

In follow up of my previous post about mocking web services, I rewrote the sample demo to better show the concept.
Not the there is a class multiplier that uses adder service. Now it is clearer to see that Multiplier is the class we want to test and not the adder.
The adder is mocked only to test the multiplier. I also removed the traditional way of creating a concrete web service for testing. It may confuse the reader.
The updated source is available in github:

There is also a available.