-
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.
This is the controller panel for Smart Panels app
[CAM-11692] Assertions for joining gateways
Mentioned Roles |
Mentioned Groups |
Assignee | New: Thorben Lindhauer [ thorben.lindhauer ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Remaining Estimate | New: 0 minutes [ 0 ] | |
Original Estimate | New: 0 minutes [ 0 ] |
Fix Version/s | New: assert-6.0.0 [ 15542 ] |
Resolution | Original: Fixed [ 1 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Reopened [ 4 ] | New: Closed [ 6 ] |