* @throws GraphException
*/
public void update(Workflow workflow) throws ComponentException,
GraphException {
WorkflowComponent newComponent = new WorkflowComponent(workflow);
URI newTemplateID = newComponent.getTemplateID();
List<GraphCanvas> graphCanvases = this.engine.getGUI()
.getGraphCanvases();
for (GraphCanvas graphCanvas : graphCanvases) {
Graph graph = graphCanvas.getGraph();
List<WorkflowNode> updatingNodes = new LinkedList<WorkflowNode>();
for (Node node : graph.getNodes()) {
if (node instanceof WorkflowNode) {
WorkflowNode workflowNode = (WorkflowNode) node;
WorkflowComponent workflowComponent = workflowNode
.getComponent();
URI templateID = workflowComponent.getTemplateID();
if (templateID.equals(newTemplateID)) {
updatingNodes.add(workflowNode);
}
}
}