Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate link throwing event issue #152

Open
Eilenn opened this issue Nov 27, 2024 · 4 comments
Open

Duplicate link throwing event issue #152

Eilenn opened this issue Nov 27, 2024 · 4 comments
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers pr welcome We rely on a community contribution to improve this. spring cleaning Could be cleaned up one day

Comments

@Eilenn
Copy link

Eilenn commented Nov 27, 2024

https://github.com/bpmn-io/bpmnlint/blob/566bec812d70751af28b252d3fdd3afce99f4dc5/rules/link-event.js#L58C37-L58C95

The line above points to Duplicate link throw event with name <${name}> in scope error - but according to the documentation: "Multiple throwing link events can link to the same catching link event. "
See: https://docs.camunda.io/docs/components/modeler/bpmn/link-events/

I think this part should be removed - the rest of the rules are quite useful, so I wouldn't want to disable the whole rule in my config.

@barmac
Copy link
Member

barmac commented Dec 2, 2024

Thanks for the report. The rule indicates "proper" usage of link events. I think we can consider two perspectives:

  1. The rule ensures BPMN-compliant usage of link events (name enforcement, only a single catch event for given name, no catch-without-throw or throw-without-catch).
  2. The rule ensures best practice usage of link events (compliant + only 1:1 relationship for link events).

The (2) part is "best practice" (according to the rules author) as indeed there can be multiple throw events of the same name according to the spec. So the relationship is n:1

image

Given that, we could split up the rule, so that you can still ensure correctness of your BPMN without enforcing 1:1 relationship. Still, I think the latter may make sense as the n:1 relationship is an another way to create fake-join pattern:
image

@barmac barmac added the needs discussion Needs further discussion label Dec 2, 2024
@barmac
Copy link
Member

barmac commented Dec 2, 2024

I added needs discussion as I'd like to clarify whether we want the "best practice" to still be present in the ruleset.

@Eilenn
Copy link
Author

Eilenn commented Dec 2, 2024

Hi, thank you for looking into the issue and elaborating on the rules!
While I agree that "n:1 relationship is an another way to create fake-join pattern", it strongly depends on the way you use the pattern. In our usage it's not possible to create the fake join, so I would be strongly for splitting the rule - that would allow us to still use other useful rules enforced by link-event while disabling the n:1 check separately.

@barmac
Copy link
Member

barmac commented Dec 2, 2024

I think this makes sense. Would you like to contribute a proposal?

@barmac barmac added enhancement New feature or request good first issue Good for newcomers backlog Queued in backlog pr welcome We rely on a community contribution to improve this. spring cleaning Could be cleaned up one day and removed needs discussion Needs further discussion labels Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers pr welcome We rely on a community contribution to improve this. spring cleaning Could be cleaned up one day
Projects
None yet
Development

No branches or pull requests

2 participants