@Test public void testSubProcessBuilderNested() { modelInstance = Bpmn.createProcess() .startEvent() .subProcess(SUB_PROCESS_ID + 1) .embeddedSubProcess() .startEvent() .userTask() .subProcess(SUB_PROCESS_ID + 2) .embeddedSubProcess() .startEvent() .userTask() .endEvent() .subProcessDone() .serviceTask(SERVICE_TASK_ID + 1) .endEvent() .subProcessDone() .serviceTask(SERVICE_TASK_ID + 2) .endEvent() .done(); final SubProcess subProcess = modelInstance.getModelElementById(SUB_PROCESS_ID + 1); final ServiceTask serviceTask = modelInstance.getModelElementById(SERVICE_TASK_ID + 2); assertThat(subProcess.getChildElementsByType(Event.class)).hasSize(2); assertThat(subProcess.getChildElementsByType(Task.class)).hasSize(2); assertThat(subProcess.getChildElementsByType(SubProcess.class)).hasSize(1); assertThat(subProcess.getFlowElements()).hasSize(9); assertThat(subProcess.getSucceedingNodes().singleResult()).isEqualTo(serviceTask); final SubProcess nestedSubProcess = modelInstance.getModelElementById(SUB_PROCESS_ID + 2); final ServiceTask nestedServiceTask = modelInstance.getModelElementById(SERVICE_TASK_ID + 1); assertThat(nestedSubProcess.getChildElementsByType(Event.class)).hasSize(2); assertThat(nestedSubProcess.getChildElementsByType(Task.class)).hasSize(1); assertThat(nestedSubProcess.getFlowElements()).hasSize(5); assertThat(nestedSubProcess.getSucceedingNodes().singleResult()).isEqualTo(nestedServiceTask); }
public StartEventBuilder startEvent() { return startEvent(null); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(final BpmnModelInstance modelInstance, final Process process); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(final BpmnModelInstance modelInstance, final Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(final String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(final String id); ProcessBuilder eventSubProcess(
      final String id, final Consumer<EventSubProcessBuilder> consumer); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(final BpmnModelInstance modelInstance, final Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(final String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(final String id); ProcessBuilder eventSubProcess(
      final String id, final Consumer<EventSubProcessBuilder> consumer);  }