public B condition(String condition) { return condition(null, condition); }
public B condition(String condition) { return condition(null, condition); }
@Test public void shouldNotCompleteInstanceAfterIncidentIsRaisedOnExclusiveGateway() { // given testClient.deploy( Bpmn.createExecutableProcess(PROCESS_ID) .startEvent() .parallelGateway() .serviceTask("task", t -> t.zeebeTaskType("task")) .endEvent("end-1") .moveToLastGateway() .exclusiveGateway("gateway") .defaultFlow() .endEvent("end-2") .moveToNode("gateway") .sequenceFlowId("to-end-3") .condition("$.x < 21") .endEvent("end-3") .done()); testClient.createWorkflowInstance(PROCESS_ID); // when final Record<IncidentRecordValue> incident = RecordingExporter.incidentRecords(IncidentIntent.CREATED).getFirst(); testClient.completeJobOfType("task"); testClient.updatePayload(incident.getValue().getElementInstanceKey(), "{'x':123}"); testClient.resolveIncident(incident.getKey()); // then assertThatWorkflowInstanceCompletedAfter("end-2", WorkflowInstanceIntent.ELEMENT_COMPLETED); }
@Test public void shouldNotCompleteInstanceAfterIncidentIsRaisedOnExclusiveGateway() { // given testClient.deploy( Bpmn.createExecutableProcess(PROCESS_ID) .startEvent() .parallelGateway() .serviceTask("task", t -> t.zeebeTaskType("task")) .endEvent("end-1") .moveToLastGateway() .exclusiveGateway("gateway") .defaultFlow() .endEvent("end-2") .moveToNode("gateway") .sequenceFlowId("to-end-3") .condition("$.x < 21") .endEvent("end-3") .done()); testClient.createWorkflowInstance(PROCESS_ID); // when final Record<IncidentRecordValue> incident = RecordingExporter.incidentRecords(IncidentIntent.CREATED).getFirst(); testClient.completeJobOfType("task"); testClient.updatePayload(incident.getValue().getElementInstanceKey(), "{'x':123}"); testClient.resolveIncident(incident.getKey()); // then assertThatWorkflowInstanceCompletedAfter("end-2", WorkflowInstanceIntent.EVENT_ACTIVATED); }