@Test public void shouldCreateDeploymentWithMessageStartEvent() throws IOException { // given final ProcessBuilder processBuilder = Bpmn.createExecutableProcess(); final BpmnModelInstance process = processBuilder.startEvent().message(m -> m.name("startMessage")).endEvent().done(); // when final ExecuteCommandResponse resp = apiRule.partitionClient().deployWithResponse(process); // then assertThat(resp.getRecordType()).isEqualTo(RecordType.EVENT); assertThat(resp.getIntent()).isEqualTo(DeploymentIntent.CREATED); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .endEvent(elementId()) .done(); } },
private static BpmnModelInstance createWorkflowWithOneMessageStartEvent() { final BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("processId") .startEvent(EVENT_ID1) .message(m -> m.name(MESSAGE_NAME1).id("startmsgId")) .endEvent() .done(); return modelInstance; } }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .parallelGateway(elementId()) .endEvent() .done(); } },
private static BpmnModelInstance createWorkflowWithOneMessageStartEvent() { return Bpmn.createExecutableProcess("processId") .startEvent(EVENT_ID1) .message(m -> m.name(MESSAGE_NAME1).id("startmsgId")) .endEvent() .done(); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .sequenceFlowId(elementId()) .endEvent() .done(); } });
private static BpmnModelInstance createWorkflowWithOneMessageStartEvent() { final BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("processId") .startEvent(EVENT_ID1) .message(m -> m.name(MESSAGE_NAME1).id("startmsgId")) .endEvent() .done(); return modelInstance; }
private static BpmnModelInstance createWorkflowWithOneMessageStartEvent() { final BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("processId") .startEvent(EVENT_ID1) .message(m -> m.name(MESSAGE_NAME1).id("startmsgId")) .endEvent() .done(); return modelInstance; }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .exclusiveGateway(elementId()) .defaultFlow() .endEvent() .done(); } },
private static BpmnModelInstance createWorkflowWithMessageStartEventOutputMapping() { return Bpmn.createExecutableProcess("processId") .startEvent(EVENT_ID1) .zeebeOutput("$.foo", "$.mappedfoo") .message(m -> m.name(MESSAGE_NAME1).id("startmsgId")) .endEvent() .done(); }
@Test public void shouldCompleteInstanceAfterEndEvent() { // given testClient.deploy(Bpmn.createExecutableProcess(PROCESS_ID).startEvent().endEvent("end").done()); // when testClient.createWorkflowInstance(PROCESS_ID); // then assertThatWorkflowInstanceCompletedAfter("end", WorkflowInstanceIntent.EVENT_ACTIVATED); }
private static BpmnModelInstance createTimerAndMessageStartEventsModel() { final ProcessBuilder builder = Bpmn.createExecutableProcess("process"); builder.startEvent("timer_start").timerWithCycle("R/PT1S").endEvent("timer_end"); return builder.startEvent("msg_start").message("msg1").endEvent("msg_end").done(); }
private static BpmnModelInstance createMultipleTimerStartModel() { final ProcessBuilder builder = Bpmn.createExecutableProcess("process_4"); builder.startEvent("start_4").timerWithCycle("R/PT2S").endEvent("end_4"); return builder.startEvent("start_5").timerWithCycle("R/PT3S").endEvent("end_5").done(); }
@Test public void shouldCompleteInstanceAfterEndEvent() { // given testClient.deploy(Bpmn.createExecutableProcess(PROCESS_ID).startEvent().endEvent("end").done()); // when testClient.createWorkflowInstance(PROCESS_ID); // then assertThatWorkflowInstanceCompletedAfter("end", WorkflowInstanceIntent.ELEMENT_COMPLETED); }
private static BpmnModelInstance createTimerAndMessageStartEventsModel() { final ProcessBuilder builder = Bpmn.createExecutableProcess("process"); builder.startEvent("timer_start").timerWithCycle("R/PT1S").endEvent("timer_end"); return builder.startEvent("msg_start").message("msg1").endEvent("msg_end").done(); }
private static BpmnModelInstance createMultipleTimerStartModel() { final ProcessBuilder builder = Bpmn.createExecutableProcess("process_4"); builder.startEvent("start_4").timerWithCycle("R/PT2S").endEvent("end_4"); return builder.startEvent("start_5").timerWithCycle("R/PT3S").endEvent("end_5").done(); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .serviceTask("task", b -> b.zeebeTaskType(taskType())) .boundaryEvent(elementId()) .timerWithDuration("PT0.01S") .endEvent() .done(); } },
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .serviceTask("task", b -> b.zeebeTaskType(taskType())) .boundaryEvent(elementId()) .timerWithDuration("PT0.01S") .endEvent() .done(); } },
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .serviceTask("task", b -> b.zeebeTaskType(taskType())) .boundaryEvent(elementId()) .message(b -> b.name(messageName()).zeebeCorrelationKey("$.id")) .endEvent() .done(); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent() .serviceTask("task", b -> b.zeebeTaskType(taskType())) .boundaryEvent(elementId()) .message(b -> b.name(messageName()).zeebeCorrelationKey("$.id")) .endEvent() .done(); }