Problem Description

Its pretty easy to create process models in the modelling notation BPMN by using the camunda modeler which is a plug-in for Eclipse. However, message flows which join pools are a bit cumbersome (still applies to the current version 2.6.0). Per default the message flows always start in the center of the source element and end in the center of destination element. The process models are therefore hard to read due to overlapping message flows:

blog

Objective

In many cases the message flows would actually look much better if they were layouted vertically with a single line, but this is difficult (impossible?) to achieve with the graphical interface of the camunda modeler. (The Signavio modeler actually draws good looking vertical lines!)

Solution

BPMNs are serialized using a XML format specified by the OMG (BPMN 2.0 Spec). A possible solution is to edit the underlying XML format manually in the “Source” view of the camunda modeler. The message flow is per default defined by four points of which the second and the third points must be removed and the horizontal ordinate of the start or end point must be updated (which one depends on the message flow’s direction).

Preferably, the manipulation of the XML should be automaticaly repeatable, e.g. using XSLT. The following XSL transformation does the job:

 

XSL Transformation

The transformation can be invoked using a XSLT processor, e.g. xsltproc.

In this example the source and destination files are identical, i.e. the source file will be overwritten by the result of the transformation.

The resulting process model is much easier to read:

blog-beautified

Note: Outgoing and incoming message flows of tasks are placed slightly to the left and right, respectively.

Invocation in Eclipse

It’s a waste of time to call xsltproc in the command line and get the parameters correct on every invocation. A simple but time saving solution is to configure an “External Tool” configuration in Eclipse

ExternalTool Configuration

Now, the layouting of the message flows is very simple:

  • Select any process model in the project explorer.
  • Invoke the “BPMN Beautifier” with a single click on the “External Tools” icon in the toolbar.
  • Refresh the process model.
  • Continue to view and edit the beautified process model.

Unfortunately, when moving elements the beautified layout of the message flows may be destroyed. This can easily be corrected by just executing the “BPMN Beautifier” again.

btw, there is a ticket in which the improved layouting of elements is described and which will make my solution obsolete: https://app.camunda.com/jira/browse/CAM-277

 

Happy modelling!

 

Leave a Comment

2 comments

  1. That’s awesome, Tobias. Thanks for contributing 🙂

    Jakob

  2. T

    Hi Jakob,

    thanks for your positive feedback.

    Tobias

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close