}else {
WorkerResource worker = jpa.getWorker();
if (isWorkflowExists(workflowName)){
throw new UserWorkflowAlreadyExistsException(workflowName);
}
UserWorkflowResource workflowResource = worker.createWorkflowTemplate(workflowName);
workflowResource.setContent(workflowGraphXml);
workflowResource.save();
}
}