descriptor.getMetaAttributes().put("generator", "OSWOrkflow Designer");
descriptor.getMetaAttributes().put("generator", "OSWorkflow Designer");
  public boolean saveWorkflow(String name, WorkflowDescriptor descriptor, WorkflowGraph graph, boolean replace) throws FactoryException  {    Object obj = layouts.get(name);    if(obj instanceof Layout)    {      Layout layout = (Layout)obj;      try      {        WorkflowConfig config = (WorkflowConfig)workflows.get(name);        URL url = new URL(getLayoutURL(config, name));        File file = new File(url.getFile());        PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(file)));        layout.writeXML(out, 0, graph);        out.flush();        out.close();        if(config.location==null)        {          config.location = name + ".xml";          config.url = new File(workflowsXML.getParentFile(), config.location).toURL();        }      }      catch(IOException e)      {        e.printStackTrace();        return false;      }    }    if(descriptor!=null)    {      WorkflowConfig config = (WorkflowConfig)workflows.get(name);      if(config.url!=null)      {	      descriptor.getMetaAttributes().put("generator", "OSWOrkflow Designer");	      descriptor.getMetaAttributes().put("lastModified", (new Date()).toString());        return super.saveWorkflow(name, descriptor, replace);      }      else      {        System.out.println("WARN: *** saveWorkflow called with config.location=" + config.location + " url is null");      }    }    return false;  }