/** * Searches the whole process, including subprocesses */ public FlowElementsContainer getFlowElementsContainer(String flowElementId) { return getFlowElementsContainer(this, flowElementId); }
/** * Searches the whole process, including subprocesses */ public FlowElementsContainer getFlowElementsContainer(String flowElementId) { return getFlowElementsContainer(this, flowElementId); }
protected FlowElementsContainer getFlowElementsContainer(FlowElementsContainer flowElementsContainer, String flowElementId) { for (FlowElement flowElement : flowElementsContainer.getFlowElements()) { if (flowElement.getId() != null && flowElement.getId().equals(flowElementId)) { return flowElementsContainer; } else if (flowElement instanceof FlowElementsContainer) { FlowElementsContainer result = getFlowElementsContainer((FlowElementsContainer) flowElement, flowElementId); if (result != null) { return result; } } } return null; }
protected FlowElementsContainer getFlowElementsContainer(FlowElementsContainer flowElementsContainer, String flowElementId) { for (FlowElement flowElement : flowElementsContainer.getFlowElements()) { if (flowElement.getId() != null && flowElement.getId().equals(flowElementId)) { return flowElementsContainer; } else if (flowElement instanceof FlowElementsContainer) { FlowElementsContainer result = getFlowElementsContainer((FlowElementsContainer) flowElement, flowElementId); if (result != null) { return result; } } } return null; }
FlowElementsContainer sourceContainer = process.getFlowElementsContainer(source.getId()); FlowElementsContainer targetContainer = process.getFlowElementsContainer(target.getId());