private BpmnModelInstance createWorkflow(final YamlDefinitionImpl definition) { this.definition = definition; createdTasks.clear(); tasksById.clear(); for (YamlTask task : definition.getTasks()) { tasksById.put(task.getId(), task); } final StartEventBuilder builder = Bpmn.createExecutableProcess(definition.getName()).startEvent(); final YamlTask initialTask = definition.getTasks().get(0); addTask(builder, initialTask.getId()); return builder.done(); }
private BpmnModelInstance createWorkflow(final YamlDefinitionImpl definition) { this.definition = definition; createdTasks.clear(); tasksById.clear(); for (YamlTask task : definition.getTasks()) { tasksById.put(task.getId(), task); } final StartEventBuilder builder = Bpmn.createExecutableProcess(definition.getName()).startEvent(); final YamlTask initialTask = definition.getTasks().get(0); addTask(builder, initialTask.getId()); return builder.done(); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()).startEvent().done(); } },
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()).startEvent().done(); } },
@Override public BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()).startEvent(elementId()).done(); } },
@Test public void shouldCreateDeploymentIfUnusedInvalidMessage() throws IOException { // given final BpmnModelInstance process = Bpmn.createExecutableProcess().startEvent().done(); process.getDefinitions().addChildElement(process.newInstance(Message.class)); // when final ExecuteCommandResponse resp = apiRule.partitionClient().deployWithResponse(process); // then assertThat(resp.getRecordType()).isEqualTo(RecordType.EVENT); assertThat(resp.getIntent()).isEqualTo(DeploymentIntent.CREATED); }
@Test public void shouldCreateDeploymentIfUnusedInvalidMessage() throws IOException { // given final BpmnModelInstance process = Bpmn.createExecutableProcess().startEvent().done(); process.getDefinitions().addChildElement(process.newInstance(Message.class)); // when final ExecuteCommandResponse resp = apiRule.partitionClient().deployWithResponse(process); // then assertThat(resp.getRecordType()).isEqualTo(RecordType.EVENT); assertThat(resp.getIntent()).isEqualTo(DeploymentIntent.CREATED); }
@Override public BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()).startEvent(elementId()).done(); } },
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent(elementId()) .timerWithCycle("R1/PT0.01S") .done(); }
@Override BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent(elementId()) .timerWithCycle("R1/PT0.01S") .done(); }
@Test public void shouldCompleteInstanceAfterEventWithoutOutgoingSequenceFlows() { // given testClient.deploy(Bpmn.createExecutableProcess(PROCESS_ID).startEvent("start").done()); // when testClient.createWorkflowInstance(PROCESS_ID); // then assertThatWorkflowInstanceCompletedAfter("start", WorkflowInstanceIntent.EVENT_TRIGGERED); }
@Override public BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent(elementId()) .message(messageName()) .done(); }
@Override public BpmnModelInstance modelInstance() { return Bpmn.createExecutableProcess(processId()) .startEvent(elementId()) .message(messageName()) .done(); }
@Test public void shouldCompleteInstanceAfterEventWithoutOutgoingSequenceFlows() { // given testClient.deploy(Bpmn.createExecutableProcess(PROCESS_ID).startEvent("start").done()); // when testClient.createWorkflowInstance(PROCESS_ID); // then assertThatWorkflowInstanceCompletedAfter("start", WorkflowInstanceIntent.ELEMENT_COMPLETED); }