@Test public void addChildElement() { Process process = p.getProcess(); BoundaryEventPropertyWriter boundaryEventPropertyWriter = new BoundaryEventPropertyWriter(bpmn2.createBoundaryEvent(), variableScope, new HashSet<>()); UserTaskPropertyWriter userTaskPropertyWriter = new UserTaskPropertyWriter(bpmn2.createUserTask(), variableScope, new HashSet<>()); DataObjectPropertyWriter dataObjectPropertyWriter = new DataObjectPropertyWriter(bpmn2.createDataObjectReference(), variableScope, new HashSet<>()); p.addChildElement(boundaryEventPropertyWriter); p.addChildElement(userTaskPropertyWriter); p.addChildElement(dataObjectPropertyWriter); assertThat(process.getFlowElements().get(0)).isEqualTo(dataObjectPropertyWriter.getFlowElement()); assertThat(process.getFlowElements().get(1)).isEqualTo(userTaskPropertyWriter.getFlowElement()); assertThat(process.getFlowElements().get(2)).isEqualTo(boundaryEventPropertyWriter.getFlowElement()); }
public void addChildElement(BasePropertyWriter p) { Processes.addChildElement( p, childElements, process, simulationParameters, itemDefinitions, rootElements); addChildShape(p.getShape()); addChildEdge(p.getEdge()); if (p instanceof SubProcessPropertyWriter) { addSubProcess((SubProcessPropertyWriter) p); } else if (p instanceof DataObjectPropertyWriter) { process.getFlowElements().addAll(((DataObjectPropertyWriter)p).getDataObjects()); } }
ProcessPropertyWriter extends BasePropertyWriter implements ElementContainer { public void addChildElement(BasePropertyWriter p) { Processes.addChildElement( p, childElements, process, simulationParameters, itemDefinitions, rootElements); addChildShape(p.getShape()); addChildEdge(p.getEdge()); if (p instanceof SubProcessPropertyWriter) { addSubProcess((SubProcessPropertyWriter) p); } else if (p instanceof DataObjectPropertyWriter) { process.getFlowElements().addAll(((DataObjectPropertyWriter)p).getDataObjects()); } } }
ProcessPropertyWriter extends BasePropertyWriter implements ElementContainer { public void addChildElement(BasePropertyWriter p) { Processes.addChildElement( p, childElements, process, simulationParameters, itemDefinitions, rootElements); addChildShape(p.getShape()); addChildEdge(p.getEdge()); if (p instanceof SubProcessPropertyWriter) { addSubProcess((SubProcessPropertyWriter) p); } else if (p instanceof DataObjectPropertyWriter) { process.getFlowElements().addAll(((DataObjectPropertyWriter)p).getDataObjects()); } } ProcessPropertyWriter(Process process, VariableScope variableScope); }
ProcessPropertyWriter extends BasePropertyWriter implements ElementContainer { public void addChildElement(BasePropertyWriter p) { Processes.addChildElement( p, childElements, process, simulationParameters, itemDefinitions, rootElements); addChildShape(p.getShape()); addChildEdge(p.getEdge()); if (p instanceof SubProcessPropertyWriter) { addSubProcess((SubProcessPropertyWriter) p); } else if (p instanceof DataObjectPropertyWriter) { process.getFlowElements().addAll(((DataObjectPropertyWriter)p).getDataObjects()); } } ProcessPropertyWriter(Process process, VariableScope variableScope); void setId(String value); Process getProcess(); void addChildShape(BPMNShape shape); void addChildEdge(BPMNEdge edge); BPMNDiagram getBpmnDiagram(); void addChildElement(BasePropertyWriter p); @Override Collection<BasePropertyWriter> getChildElements(); BasePropertyWriter getChildElement(String id); void setName(String value); void setExecutable(Boolean value); void setPackage(String value); void setType(String value); void setVersion(String value); void setAdHoc(Boolean adHoc); void setDescription(String value); void setProcessVariables(BaseProcessVariables processVariables); void setMetadata(final MetaDataAttributes metaDataAttributes); void setCaseFileVariables(CaseFileVariables caseFileVariables); void setCaseIdPrefix(CaseIdPrefix caseIdPrefix); void setCaseRoles(CaseRoles roles); void setGlobalVariables(GlobalVariables globalVariables); void setSlaDueDate(SLADueDate slaDueDate); void setDefaultImports(List<DefaultImport> imports); void addLaneSet(Collection<LanePropertyWriter> lanes); Collection<ElementParameters> getSimulationParameters(); Relationship getRelationship(); }
ProcessPropertyWriter extends BasePropertyWriter implements ElementContainer { public void addChildElement(BasePropertyWriter p) { Processes.addChildElement( p, childElements, process, simulationParameters, itemDefinitions, rootElements); addChildShape(p.getShape()); addChildEdge(p.getEdge()); if (p instanceof SubProcessPropertyWriter) { addSubProcess((SubProcessPropertyWriter) p); } else if (p instanceof DataObjectPropertyWriter) { process.getFlowElements().addAll(((DataObjectPropertyWriter)p).getDataObjects()); } } ProcessPropertyWriter(Process process, VariableScope variableScope); void setId(String value); Process getProcess(); void addChildShape(BPMNShape shape); void addChildEdge(BPMNEdge edge); BPMNDiagram getBpmnDiagram(); void addChildElement(BasePropertyWriter p); @Override Collection<BasePropertyWriter> getChildElements(); BasePropertyWriter getChildElement(String id); void setName(String value); void setExecutable(Boolean value); void setPackage(String value); void setType(String value); void setVersion(String value); void setAdHoc(Boolean adHoc); void setDescription(String value); void setProcessVariables(BaseProcessVariables processVariables); void setMetadata(final MetaDataAttributes metaDataAttributes); void setCaseFileVariables(CaseFileVariables caseFileVariables); void setCaseIdPrefix(CaseIdPrefix caseIdPrefix); void setCaseRoles(CaseRoles roles); void setGlobalVariables(GlobalVariables globalVariables); void setSlaDueDate(SLADueDate slaDueDate); void setDefaultImports(List<DefaultImport> imports); void addLaneSet(Collection<LanePropertyWriter> lanes); Collection<ElementParameters> getSimulationParameters(); Relationship getRelationship();  }