bpmn-io / bpmnlint

Validate BPMN diagrams based on configurable lint rules.
MIT License
125 stars 37 forks source link

Detect asymmetric modeling #95

Open nikku opened 1 year ago

nikku commented 1 year ago

The rule should detect the following modeling patterns

Asymetric use of parallel / exclusive gateways, causing deadlocks or unintended token splits.

image

image

How does the rule improve the BPMN diagram?

Modeling symmetric is a modeling good practice. Not doing it leads to bad BPMN diagrams (harder to understand) and causes errors (dead locks, token splits).

Rule Details

What alternatives did you consider?

None.

david-d-le commented 1 year ago

Hi, I would like to solve this issue. However @nikku I would need some additional information.

What exactly asymmetric/symetric model means? Is it only that splitting/joining gateway must be of the same type? Must every gateway have it's pair? Are there other conditions that must meet?

nikku commented 1 year ago

@david-d-le The recommendation indeed is that every forking gateway has its joining pair. However in practice this is not feasible, so we want to carefully approach this, i.e. see if we can detect + compute good vs. bad patterns at all.

I'm not sure due to the inherent complexity of this topic that it is a good community pick.

david-d-le commented 1 year ago

@david-d-le The recommendation indeed is that every forking gateway has its joining pair. However in practice this is not feasible, so we want to carefully approach this, i.e. see if we can detect + compute good vs. bad patterns at all.

I'm not sure due to the inherent complexity of this topic that it is a good community pick.

Yes you are right. If every forking gateway has its joining pair it would be easy (I was using partitioning approach in my thesis which worked for finding the pairs). But yes in practice where not every gateway has its pair, It is probably impossible to check so I will probably need to leave this to you.