Added getDefinitionByName() method to Workflow JavaScript API's WorkflowManager class

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9351 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Glen Johnson 2008-06-02 11:03:20 +00:00
parent 162cf4e2e1
commit f084a9bf44

View File

@ -74,6 +74,19 @@ public class WorkflowManager extends BaseScopableProcessorExtension
this.services.getWorkflowService().getDefinitionById(id);
return new JscriptWorkflowDefinition(cmrWorkflowDefinition, this.services, getScope());
}
/**
* Get deployed workflow definition by Name
*
* @param name the workflow definition name
* @return the workflow definition matching the given name
*/
public JscriptWorkflowDefinition getDefinitionByName(String name)
{
WorkflowDefinition cmrWorkflowDefinition =
this.services.getWorkflowService().getDefinitionByName(name);
return new JscriptWorkflowDefinition(cmrWorkflowDefinition, this.services, getScope());
}
/**
* Get tasks assigned to the current user. Note that this will only return in-progress