camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 478 forks source link

Display linting error for process with link events linking between different scopes #3532

Open korthout opened 1 year ago

korthout commented 1 year ago

What should we do?

Add a linting rule in bpmnlint that disallows linking events between two different scopes.

Examples ## Allowed examples ### Within the root scope Screenshot 2023-03-30 at 11 33 35 ### Within the same subprocess scope Screenshot 2023-03-30 at 11 34 30 ## Not allowed examples ### From root scope to subprocess scope Screenshot 2023-03-30 at 11 31 07 ### Between two different subprocess scopes Screenshot 2023-03-30 at 11 31 54 ### From subprocess scope to root scope Screenshot 2023-03-30 at 11 32 25

Why should we do it?

Link events are about to be released with 8.2.

Link events can only be used to link sections of a process within the same scope. I.e., they can only exist together on the root process level or within the same subprocess.

Similarly, a sequence flow cannot be drawn between flow nodes at different scopes. For example, a task in the root process level cannot connect to another task in a subprocess using a sequence flow. Link events have the same limitation.

Documentation describing this limitation: https://github.com/camunda/camunda-platform-docs/pull/1813/files#diff-34469b07893c827e8a343835e1da741cf6fdf9f80dc51b24332b7c94330b2717R30-R37

Related bug https://github.com/camunda/zeebe/issues/10854


Related to https://github.com/camunda/bpmnlint-plugin-camunda-compat/issues/136, https://github.com/camunda/bpmnlint-plugin-camunda-compat/issues/129

nikku commented 1 year ago

Thanks for opening this issue.

Documentation describing this limitation

I'm not sure this is an actual limitation, or just a "stay sane" fact, cf. sequence flow handling.

Moving to 8.2, so we have this as a radar as a potential follow-up improvement.

korthout commented 1 year ago

I'm not sure this is an actual limitation, or just a "stay sane" fact, cf. sequence flow handling.

It is part of the spec under Link Event Definition in 10.5.5 Event Definitions

The use of Link Events is limited to a single Process level (i.e., they cannot link a parent Process with a Sub-Process).

nikku commented 1 year ago

@korthout Exactly. I'd just not phrase it as a limitation, but as "this is how it is defined in the BPMN spec" :slightly_smiling_face:.

nikku commented 9 months ago

Re-visiting for 8.4 release.

nikku commented 9 months ago

We're going to add a bpmnlint rule to validate this (links are only allowed within the same scope).

nikku commented 7 months ago

A link-event validating the basics of BPMN soonish via https://github.com/bpmn-io/bpmnlint/pull/128.

nikku commented 6 months ago

@philippfromme Removed from current milestone. Let's decide if this shall be eligible for the next one.