static void addChildElement(
            BasePropertyWriter p,
            Map<String, BasePropertyWriter> childElements,
            FlowElementsContainer process,
            Collection<ElementParameters> simulationParameters,
            List<ItemDefinition> itemDefinitions,
            List<RootElement> rootElements) {
        childElements.put(p.getElement().getId(), p);
        if (p.getElement() instanceof FlowElement) {
            // compatibility fix: boundary events should always occur at the bottom
            // otherwise they will be drawn at an incorrect position on load
            if (p instanceof BoundaryEventPropertyWriter) {
                process.getFlowElements().add((FlowElement) p.getElement());
            } else {
                process.getFlowElements().add(0, (FlowElement) p.getElement());
                p.getElement();
            }
        } else if (p.getElement() instanceof Artifact) {
            if (process instanceof Process) {
                ((Process) process).getArtifacts().add((Artifact) p.getElement());
            } else if (process instanceof SubProcess) {
                ((SubProcess) process).getArtifacts().add((Artifact) p.getElement());
            }
        }
        if (p instanceof PropertyWriter) {
            ElementParameters sp = ((PropertyWriter) p).getSimulationParameters();
            if (sp != null) {
                simulationParameters.add(sp);
            }
        }
        itemDefinitions.addAll(p.getItemDefinitions());
        rootElements.addAll(p.getRootElements());
        rootElements.addAll(p.getInterfaces());
    }
static void addChildElement(
            BasePropertyWriter p,
            Map<String, BasePropertyWriter> childElements,
            FlowElementsContainer process,
            Collection<ElementParameters> simulationParameters,
            List<ItemDefinition> itemDefinitions,
            List<RootElement> rootElements) {
        childElements.put(p.getElement().getId(), p);
        if (p.getElement() instanceof FlowElement) {
           
           
            if (p instanceof BoundaryEventPropertyWriter) {
                process.getFlowElements().add((FlowElement) p.getElement());
            } else {
                process.getFlowElements().add(0, (FlowElement) p.getElement());
                p.getElement();
            }
        } else if (p.getElement() instanceof Artifact) {
            if (process instanceof Process) {
                ((Process) process).getArtifacts().add((Artifact) p.getElement());
            } else if (process instanceof SubProcess) {
                ((SubProcess) process).getArtifacts().add((Artifact) p.getElement());
            }
        }
        if (p instanceof PropertyWriter) {
            ElementParameters sp = ((PropertyWriter) p).getSimulationParameters();
            if (sp != null) {
                simulationParameters.add(sp);
            }
        }
        itemDefinitions.addAll(p.getItemDefinitions());
        rootElements.addAll(p.getRootElements());
        rootElements.addAll(p.getInterfaces());
    }
static void addchildelement( basepropertywriter p, map<string, basepropertywriter> childelements, flowelementscontainer process, collection<elementparameters> simulationparameters, list<itemdefinition> itemdefinitions, list<rootelement> rootelements) { childelements.put(p.getelement().getid(), p); if (p.getelement() instanceof flowelement) { if (p instanceof boundaryeventpropertywriter) { process.getflowelements().add((flowelement) p.getelement()); } else { process.getflowelements().add(0, (flowelement) p.getelement()); p.getelement(); } } else if (p.getelement() instanceof artifact) { if (process instanceof process) { ((process) process).getartifacts().add((artifact) p.getelement()); } else if (process instanceof subprocess) { ((subprocess) process).getartifacts().add((artifact) p.getelement()); } } if (p instanceof propertywriter) { elementparameters sp = ((propertywriter) p).getsimulationparameters(); if (sp != null) { simulationparameters.add(sp); } } itemdefinitions.addall(p.getitemdefinitions()); rootelements.addall(p.getrootelements()); rootelements.addall(p.getinterfaces()); }