private void setFlow(Flow flow) { for (Node node : flow.getNodes()) { String id = node.getId(); ExecutableNode exNode = new ExecutableNode(node, this); executableNodes.put(id, exNode); } for (Edge edge : flow.getEdges()) { ExecutableNode sourceNode = executableNodes.get(edge.getSourceId()); ExecutableNode targetNode = executableNodes.get(edge.getTargetId()); sourceNode.addOutNode(edge.getTargetId()); targetNode.addInNode(edge.getSourceId()); } if (flow.getSuccessEmails() != null) { successEmails = new ArrayList<String>(flow.getSuccessEmails()); } if (flow.getFailureEmails() != null) { failureEmails = new ArrayList<String>(flow.getFailureEmails()); } flowProps.putAll(flow.getAllFlowProps()); }