@Override
public Map<String, String> getWorkflows() throws RegistryException {
if (userWorkflowRegistry != null){
return userWorkflowRegistry.getWorkflows();
}
WorkerResource worker = jpa.getWorker();
Map<String, String> workflows=new HashMap<String, String>();
List<UserWorkflowResource> workflowTemplates = worker.getWorkflowTemplates();
for (UserWorkflowResource resource : workflowTemplates) {
workflows.put(resource.getName(), resource.getContent());
}
return workflows;
}