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

Parallel gateway join is not spec compliant (does not account for tokens on all incoming flows) #84

Open
EliM147 opened this issue Feb 1, 2024 · 1 comment
Labels
backlog Queued in backlog bug Something isn't working

Comments

@EliM147
Copy link

EliM147 commented Feb 1, 2024

Describe the Bug

When multiple tokens (2 or more) arrive at a parallel gateway from a single flow, two of them merge and one token will continue (e.g., if there were 3 tokens, 2 will merge, and only 1 will be stuck there).

It is wrong, and all three tokens should get stuck there, since it waits for the merge on ALL the incoming flows.

How it should be:
image

How it is:
image

Parallel gateway waits for as many tokens as there are incoming flows, not necessarily for all the tokens from all sides to be merged.

Steps to Reproduce

Have a model (e.g., like one I showed), and then have a situation, when 0 tokens come from one path to a parallel gateway, and all the tokens come from a single path, and then see how each 2 tokens would merge.

6_V_powerpoint.mp4
V6_camunda_modeler.mp4

Expected Behavior

Parallel gateway MUST wait for tokens from ALL incoming paths (i.e., a token coming from two paths can be merged, and two tokens from one path - cant).

I believe it is because a gateway merges the tokens automatically, depending on the number of incoming flows

P.S.
We are the researchers trying to use CAMUNDA token modeler for better teaching of the students, we were thinking if we can contact somehow the person, who could help with fixing the bug? Thanks!


Depends on bpmn-io/bpmn-js-token-simulation#130

@EliM147 EliM147 added the bug Something isn't working label Feb 1, 2024
@nikku nikku changed the title Parallel gateway doesn't necessarily wait for tokens coming from all incoming paths, but for as many as there are incoming paths (must wait for a token from all sides to merge one token) Parallel gateway join is not spec compliant (does not account for tokens on all incoming flows) Feb 2, 2024
@nikku nikku added the backlog Queued in backlog label Feb 2, 2024
@nikku
Copy link
Member

nikku commented Feb 2, 2024

Thanks for your bug report, and great to hear you find this useful as a learning tool. We could not agree more.

The issue you reported needs to be fixed upstream via bpmn-io/bpmn-js-token-simulation#130, in the library that powers this plug-in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants