protected void setFlow(final Project project, final Flow flow) { this.flowId = flow.getId(); this.flowProps.putAll(flow.getAllFlowProps()); for (final Node node : flow.getNodes()) { final String id = node.getId(); if (node.getType().equals(SpecialJobTypes.EMBEDDED_FLOW_TYPE)) { final String embeddedFlowId = node.getEmbeddedFlowId(); final Flow subFlow = project.getFlow(embeddedFlowId); final ExecutableFlowBase embeddedFlow = new ExecutableFlowBase(project, node, subFlow, this); this.executableNodes.put(id, embeddedFlow); } else { final ExecutableNode exNode = new ExecutableNode(node, this); this.executableNodes.put(id, exNode); } } for (final Edge edge : flow.getEdges()) { final ExecutableNode sourceNode = this.executableNodes.get(edge.getSourceId()); final ExecutableNode targetNode = this.executableNodes.get(edge.getTargetId()); if (sourceNode == null) { logger.info("Source node " + edge.getSourceId() + " doesn't exist"); } sourceNode.addOutNode(edge.getTargetId()); targetNode.addInNode(edge.getSourceId()); } }
final ExecutableFlowBase exFlow = new ExecutableFlowBase(); exFlow.fillExecutableFromMapObject(wrapper); exFlow.setParentFlow(this);
Flow subFlow = project.getFlow(embeddedFlowId); ExecutableFlowBase embeddedFlow = new ExecutableFlowBase(project, node, subFlow, this); executableNodes.put(id, embeddedFlow);
protected void setFlow(final Project project, final Flow flow) { this.flowId = flow.getId(); this.flowProps.putAll(flow.getAllFlowProps()); for (final Node node : flow.getNodes()) { final String id = node.getId(); if (node.getType().equals(SpecialJobTypes.EMBEDDED_FLOW_TYPE)) { final String embeddedFlowId = node.getEmbeddedFlowId(); final Flow subFlow = project.getFlow(embeddedFlowId); final ExecutableFlowBase embeddedFlow = new ExecutableFlowBase(project, node, subFlow, this); this.executableNodes.put(id, embeddedFlow); } else { final ExecutableNode exNode = new ExecutableNode(node, this); this.executableNodes.put(id, exNode); } } for (final Edge edge : flow.getEdges()) { final ExecutableNode sourceNode = this.executableNodes.get(edge.getSourceId()); final ExecutableNode targetNode = this.executableNodes.get(edge.getTargetId()); if (sourceNode == null) { logger.info("Source node " + edge.getSourceId() + " doesn't exist"); } sourceNode.addOutNode(edge.getTargetId()); targetNode.addInNode(edge.getSourceId()); } }
ExecutableFlowBase exFlow = new ExecutableFlowBase(); exFlow.fillExecutableFromMapObject(wrapper); exFlow.setParentFlow(this);
final ExecutableFlowBase exFlow = new ExecutableFlowBase(); exFlow.fillExecutableFromMapObject(wrapper); exFlow.setParentFlow(this);