@Test public void testCompensateEventDefintionReferencesActivityInDifferentScope() { modelInstance = Bpmn.createProcess() .startEvent() .userTask("userTask") .subProcess() .embeddedSubProcess() .startEvent() .userTask("subProcessTask") .endEvent() .subProcessDone() .endEvent("end") .done(); final UserTask userTask = modelInstance.getModelElementById("userTask"); final UserTaskBuilder userTaskBuilder = userTask.builder(); try { userTaskBuilder .boundaryEvent("boundary") .compensateEventDefinition() .activityRef("subProcessTask") .done(); fail("should fail"); } catch (final BpmnModelException e) { assertThat(e) .hasMessageContaining( "Activity with id 'subProcessTask' must be in the same scope as 'boundary'"); } }
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);  }