Automatic BPMN control-flow analysis and resolution

During my PhD research, I implemented a tool for automatic BPMN control-flow analysis to detect deadlocks, starvation, livelocks, and other common modeling errors (the corresponding paper is currently under review).
I was wondering if this is interesting for Or are BPMN processes usually linear in practice and do not need such analysis?

The following GIF shows how the tool finds and visualizes starvation in BPMN due to a message not always being sent. It is taken from the paper cited in an issue of the bpmn-js-token-simultion plugin.


You can try the tool yourself here, where you can select different examples in the top right. The tool can even provide quick fixes to a modeler for common errors such as gateway errors (something similar could be implemented for bpmn-lint violations).

The goals of the tool are the following:

  1. Instantaneous analysis (< 500ms).
  2. Understandability
  3. Automatic quick-fixes

My website provides some more details. If you are interested, I can present the tool, how I achieved the three goals, and its potential in more detail.

I am looking forward to hearing your opinion and chatting with you.

@timKraeuter This is a really great project. Processes in the real world are (unfortunately) not linear, hence control flow analysis is an interesting and important aspect to consider.

What I really like about what you shared is that it is such a good E2E user journey. :clap:

Our general take is the following:

  • We try to validate what is edited through pluggable lint rules; this gives users an early warning if they do something wrong, but it requires detection to be fast?
  • We could build such detection as you’ve shown into token simulation; it could in fact be used to visualize (coming from a lint rule) the actual issue at hand for the user :rocket:
  • Mid term (but we’re not there yet): Auto fix (as you showcase)

Would you mind contributing some of the things back that you created? For example, you could create a bpmnlint plug-in or contribute some rules to the core.

I’m CCing @Ingo_Richtsmeier here, could this be interesting for consulting, too?

1 Like

@nikku, thanks for the interest. I would love to contribute things back and see how it can impact modeling in practice.

Currently, I am pretty busy since I am wrapping up my Ph.D. (I plan to finish by 01.10.2024), and I am applying for software engineering jobs simultaneously. However, I am sure we can find a way to integrate features.

I am unsure if this analysis would fit in the context of a lint rule since I am not checking individual elements statically. Instead, I am analyzing the whole diagram dynamically, essentially trying out all possible combinations of BPMN elements (called formal analysis, i.e., model checking in research). Maybe we can discuss the most exciting features for you and how we can best integrate them.

Regarding fast, the analysis is written in Rust for maximum efficiency and speed. It can be run natively as a service or in the browser using webassembly as in the previous link above.
I tested the performance of the native tool in my paper, and in most cases, this led to quite a fast analysis (providing all the details here would be too long). For example, the solutions in the bpmn-for-research camunda repository take 1ms each to analyze (on my machine).

In summary, diagram size itself is not a problem. There are diagrams where the modeler breaks down before the analysis (and vice versa :wink: ). The runtime is mainly affected by diagram complexity, i.e., how many distinct execution paths exist for the given BPMN diagram (parallel branches and multiple pools contribute the most).

Let me know what you think or if you want me to present the tool in detail to you or others.