-
Feature Request
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
What is the problem?
I've modeled a process with nested joining or gateways. I want to write a JUnit test aginst it and test, if the process instance is waiting at a joining gateway.
assertThat(processInstance).isWaitingAt(gatewayId) return false, as a joining gateway is not an active activity.
What would be the expected behavior:
I would like to write
assertThat(processInstance).isWaitingForJoinAt(gatewayId);
Hints (optional):
this is a rough implementation:
public boolean isWaitingforJoin(String activityId, ProcessInstance processInstance) { ActivityInstance activityInstance = runtimeService().getActivityInstance(processInstance.getId()); ActivityInstance[] joiningGateways = activityInstance.getActivityInstances(activityId); Assertions.assertThat(joiningGateways).overridingErrorMessage("Expecting list of joining gateways not to be null, not to be empty and not to contain null values: %s." , Lists.newArrayList(joiningGateways)) .isNotNull().isNotEmpty().doesNotContainNull(); System.out.println(joiningGateways.length); for (int i = 0; i < joiningGateways.length; i++) { System.out.println(joiningGateways[i].getActivityId()); } return joiningGateways[0].getActivityId().equals(activityId); }
Attached you find process models to test with.