I have a process with two terminate events named E1 and E2. When testing the process, I want to check at which terminate event the process ended according to different conditions. I’m afraid there are no such methods like “endAt()” in ProcessInstance
’s instance. Thus, how can I test the terminate events of the process please?
The camunda bpmn asserts library has a “hasPassed” method, that can indicate which symbol the process passed through.
Thanks a lot for your reply, and it works for me. And may I have got a further question that how I can query a process which ends at a certain terminate event please?
Something like this would work:
assertThat(processInstance).hasPassed("keyOfEvent").isEnded();
Beyond that what exactly are you looking to find out?
I mean how I can use Query API to search processes which end at a certain terminate event in application’s business logic, not in the testing using some test suites.