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

In OR gateway, check only incoming sequence flows which have not received token yet #143

Open
barmac opened this issue Dec 1, 2023 · 7 comments
Labels
backlog Queued in backlog enhancement New feature or request

Comments

@barmac
Copy link
Member

barmac commented Dec 1, 2023

What should we do?

Check out this conversation: https://camunda.slack.com/archives/CKGH9LR40/p1701443318328729?thread_ts=1701360376.758139&cid=CKGH9LR40

I've already done some work on this branch: https://github.com/bpmn-io/bpmn-js-token-simulation/tree/improve-inclusive-gateway
The sequence flow provides itself as a source when another element is entered.
What I haven't figured out yet is how to somehow store all the sources to know which scopes to exclude from the search.

Why should we do it?

Spec-compliant OR gateway FTW.


Related to #130

@nikku nikku added the backlog Queued in backlog label Dec 4, 2023 — with bpmn-io-tasks
@nikku
Copy link
Member

nikku commented Dec 16, 2023

What I haven't figured out yet is how to somehow store all the sources to know which scopes to exclude from the search.

The idea is to tag all scopes with a "source" (that should already exist, I think). We can then check available scope instances for a node to see if there is one from each source where we expect a token.

@barmac
Copy link
Member Author

barmac commented Dec 19, 2023

Can we tag the scopes within the current API?

@nikku
Copy link
Member

nikku commented Dec 19, 2023

Not sure which API you refer to. But every scope has an initiator, giving you access to "who is the reason I exist".

We want to make sure it is appropriately set for sequence flow tokens entering the OR (or XOR) gateway, and to conduct the test using that information.

@barmac
Copy link
Member Author

barmac commented Dec 19, 2023

OK, so if I set the initiator from the sequence flow, all necessary information will be there.

@nikku
Copy link
Member

nikku commented Dec 19, 2023

Exactly.

@nikku
Copy link
Member

nikku commented Dec 19, 2023

If we fix this, consider fixing it for join (AND), too (#130):

capture YVN3RE_optimized

@barmac
Copy link
Member Author

barmac commented Dec 19, 2023

Thanks for your support. Indeed it would make sense to fix this for both gateways.

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
Development

No branches or pull requests

2 participants