public List reloadWorkflowDefinitions(String uname, String templateName)
throws StorageException, SecurityException, Exception {
WorkflowTemplate wftemp = getWorkflowTemplate(templateName, uname);
// check if we are admin of the latest version.
if (!wftemp.hasRole(uname, WorkflowRole.ADMIN)){
throw new SecurityException("Not allowed to reload the Workflow definition.");
}
return WorkflowManager.getInstance().reloadWorkflowDefinitions(templateName);
}