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

Support sequence flows in hasPassedElement and hasPassedElementsInOrder #318

Closed
remcowesterhoud opened this issue Apr 13, 2022 · 0 comments · Fixed by #319
Closed

Support sequence flows in hasPassedElement and hasPassedElementsInOrder #318

remcowesterhoud opened this issue Apr 13, 2022 · 0 comments · Fixed by #319
Assignees

Comments

@remcowesterhoud
Copy link
Contributor

Description

It could be valuable for a user to test if they have taken a specific sequence flow. Currently we have no way to do this. Users would expect hasPassedElement and hasPassedElementsInOrder could be used for this, however these assertions do not include sequence flow.

Expected behaviour

hasPassedElement and hasPassedElementsInOrder should be able to assert sequence flows.

Solution

Both methods have a similar filter:

 StreamFilter.processInstance(recordStream)
            .withProcessInstanceKey(actual)
            .withRejectionType(RejectionType.NULL_VAL)
            .withElementIdIn(elementIds)
            .withIntent(ProcessInstanceIntent.ELEMENT_COMPLETED)

The intent here causes sequence flows to be excluded, as we never write an ELEMENT_COMPLETED event for these. We should add a way to filter for multiple intents and turn this into:

.withIntents(ProcessInstanceIntent.ELEMENT_COMPLETED, ProcessInstanceIntent.SEQUENCE_FLOW_TAKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant