use of org.alfresco.service.cmr.workflow.WorkflowDefinition in project alfresco-remote-api by Alfresco.
the class ProcessesImplTest method findAppropriateWorkflowDefinitionId.
private WorkflowDefinition findAppropriateWorkflowDefinitionId() {
WorkflowDefinition result = null;
List<WorkflowDefinition> definitions = workflowService.getDefinitions();
for (WorkflowDefinition definition : definitions) {
if (definition.getId().startsWith(DESIRED_WORKFLOW_ID_PREFIX)) {
result = definition;
break;
}
}
return (null != result) ? (result) : (definitions.iterator().next());
}
Aggregations