@Test public void shouldCompleteInstanceAfterNonInterruptingBoundaryEventTriggered() { // given testClient.deploy( Bpmn.createExecutableProcess(PROCESS_ID) .startEvent() .serviceTask("task-1", t -> t.zeebeTaskType("task-1")) .endEvent("end-1") .moveToActivity("task-1") .boundaryEvent("timeout", b -> b.cancelActivity(false).timerWithCycle("R1/PT0.1S")) .serviceTask("task-2", t -> t.zeebeTaskType("task-2")) .endEvent("end-2") .done()); testClient.createWorkflowInstance(PROCESS_ID); // when testClient.completeJobOfType("task-2"); testClient.completeJobOfType("task-1"); // then assertThatWorkflowInstanceCompletedAfter("end-1", WorkflowInstanceIntent.EVENT_ACTIVATED); assertThatWorkflowInstanceCompletedAfter("end-2", WorkflowInstanceIntent.EVENT_ACTIVATED); }
@Test public void shouldCompleteInstanceAfterNonInterruptingBoundaryEventTriggered() { // given testClient.deploy( Bpmn.createExecutableProcess(PROCESS_ID) .startEvent() .serviceTask("task-1", t -> t.zeebeTaskType("task-1")) .endEvent("end-1") .moveToActivity("task-1") .boundaryEvent("timeout", b -> b.cancelActivity(false).timerWithCycle("R1/PT0.1S")) .serviceTask("task-2", t -> t.zeebeTaskType("task-2")) .endEvent("end-2") .done()); testClient.createWorkflowInstance(PROCESS_ID); // when testClient.completeJobOfType("task-2"); testClient.completeJobOfType("task-1"); // then assertThatWorkflowInstanceCompletedAfter("end-1", WorkflowInstanceIntent.ELEMENT_COMPLETED); assertThatWorkflowInstanceCompletedAfter("end-2", WorkflowInstanceIntent.ELEMENT_COMPLETED); }