Search in sources :

Example 31 with WorkflowDefinition

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());
}
Also used : WorkflowDefinition(org.alfresco.service.cmr.workflow.WorkflowDefinition)

Aggregations

WorkflowDefinition (org.alfresco.service.cmr.workflow.WorkflowDefinition)31 HashMap (java.util.HashMap)19 Date (java.util.Date)18 WorkflowPath (org.alfresco.service.cmr.workflow.WorkflowPath)16 QName (org.alfresco.service.namespace.QName)16 Serializable (java.io.Serializable)15 WorkflowTask (org.alfresco.service.cmr.workflow.WorkflowTask)14 GetRequest (org.springframework.extensions.webscripts.TestWebScriptServer.GetRequest)13 JSONObject (org.json.JSONObject)12 Response (org.springframework.extensions.webscripts.TestWebScriptServer.Response)12 JSONArray (org.json.JSONArray)9 WorkflowInstance (org.alfresco.service.cmr.workflow.WorkflowInstance)8 Calendar (java.util.Calendar)6 WorkflowTaskDefinition (org.alfresco.service.cmr.workflow.WorkflowTaskDefinition)5 ArrayList (java.util.ArrayList)3 Map (java.util.Map)3 NodeRef (org.alfresco.service.cmr.repository.NodeRef)3 DeleteRequest (org.springframework.extensions.webscripts.TestWebScriptServer.DeleteRequest)3 PutRequest (org.springframework.extensions.webscripts.TestWebScriptServer.PutRequest)3 PropertyDefinition (org.alfresco.service.cmr.dictionary.PropertyDefinition)2