@Test public void testCompensationTask() { modelInstance = Bpmn.createProcess() .startEvent() .userTask("task") .boundaryEvent("boundary") .compensateEventDefinition().compensateEventDefinitionDone() .compensationStart() .userTask("compensate").name("compensate") .compensationDone() .endEvent("theend") .done(); Collection<Association> associations = modelInstance.getModelElementsByType(Association.class); assertThat(associations).hasSize(1); Association association = associations.iterator().next(); assertThat(association.getSource().getId()).isEqualTo("boundary"); assertThat(association.getTarget().getId()).isEqualTo("compensate"); assertThat(association.getAssociationDirection()).isEqualTo(AssociationDirection.One); UserTask task = modelInstance.getModelElementById("task"); Collection<SequenceFlow> outgoing = task.getOutgoing(); assertThat(outgoing).hasSize(1); SequenceFlow flow = outgoing.iterator().next(); assertThat(flow.getSource().getId()).isEqualTo("task"); assertThat(flow.getTarget().getId()).isEqualTo("theend"); }
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(BpmnModelInstance modelInstance, Process process); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(BpmnModelInstance modelInstance, Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(String id); }
ProcessBuilder extends AbstractProcessBuilder<ProcessBuilder> { public StartEventBuilder startEvent() { return startEvent(null); } ProcessBuilder(BpmnModelInstance modelInstance, Process process); StartEventBuilder startEvent(); StartEventBuilder startEvent(String id); EventSubProcessBuilder eventSubProcess(); EventSubProcessBuilder eventSubProcess(String id);  }