private CatchEventPropertyWriter createCatchEventPropertyWriter(Node n) { return isDocked(n) ? propertyWriterFactory.of(bpmn2.createBoundaryEvent()) : propertyWriterFactory.of(bpmn2.createIntermediateCatchEvent()); }
@Test public void addChildElement() { Process process = p.getProcess(); BoundaryEventPropertyWriter boundaryEventPropertyWriter = new BoundaryEventPropertyWriter(bpmn2.createBoundaryEvent(), variableScope); UserTaskPropertyWriter userTaskPropertyWriter = new UserTaskPropertyWriter(bpmn2.createUserTask(), variableScope); p.addChildElement(boundaryEventPropertyWriter); p.addChildElement(userTaskPropertyWriter); // boundary event should always occur after other nodes (compat with old marshallers) assertThat(process.getFlowElements().get(0)).isEqualTo(userTaskPropertyWriter.getFlowElement()); assertThat(process.getFlowElements().get(1)).isEqualTo(boundaryEventPropertyWriter.getFlowElement()); }
@Test public void addChildElement() { SubProcess process = (SubProcess) p.getElement(); BoundaryEventPropertyWriter boundaryEventPropertyWriter = new BoundaryEventPropertyWriter(bpmn2.createBoundaryEvent(), variableScope); UserTaskPropertyWriter userTaskPropertyWriter = new UserTaskPropertyWriter(bpmn2.createUserTask(), variableScope); p.addChildElement(boundaryEventPropertyWriter); p.addChildElement(userTaskPropertyWriter); // boundary event should always occur after other nodes (compat with old marshallers) assertThat(process.getFlowElements().get(0)).isEqualTo(userTaskPropertyWriter.getFlowElement()); assertThat(process.getFlowElements().get(1)).isEqualTo(boundaryEventPropertyWriter.getFlowElement()); }
ed = ce.getEventDefinitions().get(0); BoundaryEvent be = Bpmn2Factory.eINSTANCE.createBoundaryEvent(); if (ed != null && ed instanceof ErrorEventDefinition) { be.setCancelActivity(true);
ed = beEntry.getEventDefinitions().get(0); BoundaryEvent be = Bpmn2Factory.eINSTANCE.createBoundaryEvent(); if (ed instanceof ErrorEventDefinition) { be.setCancelActivity(true);