Search in sources :

Example 1 with ProcessInfo

use of org.alfresco.rest.workflow.api.model.ProcessInfo in project alfresco-remote-api by Alfresco.

the class ProcessesImpl method createProcessInfo.

protected ProcessInfo createProcessInfo(HistoricProcessInstance processInstance) {
    ProcessInfo processInfo = new ProcessInfo(processInstance);
    ProcessDefinition definitionEntity = activitiProcessEngine.getRepositoryService().getProcessDefinition(processInstance.getProcessDefinitionId());
    processInfo.setProcessDefinitionKey(getLocalProcessDefinitionKey(definitionEntity.getKey()));
    return processInfo;
}
Also used : ProcessDefinition(org.activiti.engine.repository.ProcessDefinition) ProcessInfo(org.alfresco.rest.workflow.api.model.ProcessInfo)

Example 2 with ProcessInfo

use of org.alfresco.rest.workflow.api.model.ProcessInfo in project alfresco-remote-api by Alfresco.

the class ProcessesImpl method getProcesses.

@Override
public CollectionWithPagingInfo<ProcessInfo> getProcesses(Parameters parameters) {
    Paging paging = parameters.getPaging();
    MapBasedQueryWalker propertyWalker = new MapBasedQueryWalker(PROCESS_COLLECTION_EQUALS_QUERY_PROPERTIES, null);
    propertyWalker.setSupportedGreaterThanParameters(PROCESS_COLLECTION_GREATERTHAN_QUERY_PROPERTIES);
    propertyWalker.setSupportedLessThanParameters(PROCESS_COLLECTION_LESSTHAN_QUERY_PROPERTIES);
    propertyWalker.enableVariablesSupport(namespaceService, dictionaryService);
    if (parameters.getQuery() != null) {
        QueryHelper.walk(parameters.getQuery(), propertyWalker);
    }
    String status = propertyWalker.getProperty("status", WhereClauseParser.EQUALS);
    String processDefinitionId = propertyWalker.getProperty("processDefinitionId", WhereClauseParser.EQUALS);
    String businessKey = propertyWalker.getProperty("businessKey", WhereClauseParser.EQUALS);
    String processDefinitionKey = propertyWalker.getProperty("processDefinitionKey", WhereClauseParser.EQUALS);
    String startUserId = propertyWalker.getProperty("startUserId", WhereClauseParser.EQUALS);
    Date startedAtGreaterThan = propertyWalker.getProperty("startedAt", WhereClauseParser.GREATERTHAN, Date.class);
    Date startedAtLessThan = propertyWalker.getProperty("startedAt", WhereClauseParser.LESSTHAN, Date.class);
    Date endedAtGreaterThan = propertyWalker.getProperty("endedAt", WhereClauseParser.GREATERTHAN, Date.class);
    Date endedAtLessThan = propertyWalker.getProperty("endedAt", WhereClauseParser.LESSTHAN, Date.class);
    Boolean includeVariables = propertyWalker.getProperty("includeVariables", WhereClauseParser.EQUALS, Boolean.class);
    if (status != null && PROCESS_STATUS_LIST.contains(status) == false) {
        throw new InvalidArgumentException("Invalid status parameter: " + status);
    }
    List<SortColumn> sortList = parameters.getSorting();
    SortColumn sortColumn = null;
    if (sortList != null && sortList.size() > 0) {
        if (sortList.size() != 1) {
            throw new InvalidArgumentException("Only one order by parameter is supported");
        }
        sortColumn = sortList.get(0);
    }
    final HistoricProcessInstanceQuery query = activitiProcessEngine.getHistoryService().createHistoricProcessInstanceQuery();
    if (processDefinitionId != null)
        query.processDefinitionId(processDefinitionId);
    if (businessKey != null)
        query.processInstanceBusinessKey(businessKey);
    if (processDefinitionKey != null) {
        if (tenantService.isEnabled() && deployWorkflowsInTenant) {
            if (processDefinitionKey.startsWith("@" + TenantUtil.getCurrentDomain() + "@")) {
                query.processDefinitionKey(processDefinitionKey);
            } else {
                query.processDefinitionKey("@" + TenantUtil.getCurrentDomain() + "@" + processDefinitionKey);
            }
        } else {
            query.processDefinitionKey(processDefinitionKey);
        }
    }
    if (startUserId != null)
        query.startedBy(startUserId);
    if (startedAtGreaterThan != null)
        query.startedAfter(startedAtGreaterThan);
    if (startedAtLessThan != null)
        query.startedBefore(startedAtLessThan);
    if (endedAtGreaterThan != null)
        query.finishedAfter(endedAtGreaterThan);
    if (endedAtLessThan != null)
        query.finishedBefore(endedAtLessThan);
    if (status == null || PROCESS_STATUS_ACTIVE.equals(status)) {
        query.unfinished();
    } else if (PROCESS_STATUS_COMPLETED.equals(status)) {
        query.finished();
        query.notDeleted();
    } else if (PROCESS_STATUS_DELETED.equals(status)) {
        query.deleted();
    }
    if (includeVariables != null && includeVariables) {
        query.includeProcessVariables();
    }
    List<QueryVariableHolder> variableProperties = propertyWalker.getVariableProperties();
    if (variableProperties != null) {
        for (QueryVariableHolder queryVariableHolder : variableProperties) {
            if (queryVariableHolder.getOperator() == WhereClauseParser.EQUALS) {
                query.variableValueEquals(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.GREATERTHAN) {
                query.variableValueGreaterThan(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.GREATERTHANOREQUALS) {
                query.variableValueGreaterThanOrEqual(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.LESSTHAN) {
                query.variableValueLessThan(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.LESSTHANOREQUALS) {
                query.variableValueLessThanOrEqual(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.MATCHES) {
                if (queryVariableHolder.getPropertyValue() instanceof String == false) {
                    throw new InvalidArgumentException("the matches operator can only be used with a String value for property " + queryVariableHolder.getPropertyName());
                }
                if (((String) queryVariableHolder.getPropertyValue()).startsWith("(?i)")) {
                    query.variableValueLikeIgnoreCase(queryVariableHolder.getPropertyName(), ((String) queryVariableHolder.getPropertyValue()).substring("(?i)".length()).toLowerCase());
                } else {
                    query.variableValueLike(queryVariableHolder.getPropertyName(), (String) queryVariableHolder.getPropertyValue());
                }
            } else if (queryVariableHolder.getOperator() == WhereClauseParser.NEGATION) {
                query.variableValueNotEquals(queryVariableHolder.getPropertyName(), queryVariableHolder.getPropertyValue());
            } else {
                throw new InvalidArgumentException("variable " + queryVariableHolder.getPropertyName() + " can only be used with an =, >, >=, <=, <, not, matches comparison type");
            }
        }
    }
    if (authorityService.isAdminAuthority(AuthenticationUtil.getRunAsUser())) {
        // Admin is allowed to read all processes in the current tenant
        if (tenantService.isEnabled()) {
            query.variableValueEquals(ActivitiConstants.VAR_TENANT_DOMAIN, TenantUtil.getCurrentDomain());
        }
    } else {
        // If non-admin user, involvement in the process is required (either owner, assignee or externally involved).
        query.involvedUser(AuthenticationUtil.getRunAsUser());
    }
    if (sortColumn != null) {
        if (PROCESS_COLLECTION_SORT_PROPERTIES.contains(sortColumn.column)) {
            if ("processDefinitionId".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessDefinitionId();
            } else if ("id".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessInstanceId();
            } else if ("businessKey".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessInstanceBusinessKey();
            } else if ("startedAt".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessInstanceStartTime();
            } else if ("endedAt".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessInstanceEndTime();
            } else if ("durationInMillis".equalsIgnoreCase(sortColumn.column)) {
                query.orderByProcessInstanceDuration();
            }
        } else {
            throw new InvalidArgumentException("sort " + sortColumn.column + " is not supported, supported items are " + Arrays.toString(PROCESS_COLLECTION_SORT_PROPERTIES.toArray()));
        }
        if (sortColumn.asc) {
            query.asc();
        } else {
            query.desc();
        }
    } else {
        query.orderByProcessInstanceStartTime().desc();
    }
    List<HistoricProcessInstance> processInstances = query.listPage(paging.getSkipCount(), paging.getMaxItems());
    int totalCount = (int) query.count();
    List<ProcessInfo> page = new ArrayList<ProcessInfo>(processInstances.size());
    Map<String, TypeDefinition> definitionTypeMap = new HashMap<String, TypeDefinition>();
    for (HistoricProcessInstance processInstance : processInstances) {
        ProcessInfo processInfo = createProcessInfo(processInstance);
        if (includeVariables != null && includeVariables) {
            if (definitionTypeMap.containsKey(processInfo.getProcessDefinitionId()) == false) {
                StartFormData startFormData = activitiProcessEngine.getFormService().getStartFormData(processInfo.getProcessDefinitionId());
                if (startFormData != null) {
                    String formKey = startFormData.getFormKey();
                    definitionTypeMap.put(processInfo.getProcessDefinitionId(), getWorkflowFactory().getTaskFullTypeDefinition(formKey, true));
                }
            }
            if (definitionTypeMap.containsKey(processInfo.getProcessDefinitionId())) {
                // Convert raw variables to Variable objects
                List<Variable> resultingVariables = restVariableHelper.getVariables(processInstance.getProcessVariables(), definitionTypeMap.get(processInfo.getProcessDefinitionId()));
                processInfo.setProcessVariables(resultingVariables);
            }
        }
        page.add(processInfo);
    }
    return CollectionWithPagingInfo.asPaged(paging, page, (page.size() + paging.getSkipCount()) < totalCount, totalCount);
}
Also used : Variable(org.alfresco.rest.workflow.api.model.Variable) HistoricProcessInstanceQuery(org.activiti.engine.history.HistoricProcessInstanceQuery) HashMap(java.util.HashMap) Paging(org.alfresco.rest.framework.resource.parameters.Paging) HistoricProcessInstance(org.activiti.engine.history.HistoricProcessInstance) ArrayList(java.util.ArrayList) QueryVariableHolder(org.alfresco.rest.workflow.api.impl.MapBasedQueryWalker.QueryVariableHolder) ProcessInfo(org.alfresco.rest.workflow.api.model.ProcessInfo) SortColumn(org.alfresco.rest.framework.resource.parameters.SortColumn) Date(java.util.Date) TypeDefinition(org.alfresco.service.cmr.dictionary.TypeDefinition) DataTypeDefinition(org.alfresco.service.cmr.dictionary.DataTypeDefinition) InvalidArgumentException(org.alfresco.rest.framework.core.exceptions.InvalidArgumentException) StartFormData(org.activiti.engine.form.StartFormData)

Example 3 with ProcessInfo

use of org.alfresco.rest.workflow.api.model.ProcessInfo in project alfresco-remote-api by Alfresco.

the class TaskWorkflowApiTest method testSetOutcome.

@Test
@SuppressWarnings("unchecked")
public void testSetOutcome() throws Exception {
    RequestContext requestContext = initApiClientWithTestUser();
    ProcessInfo processInf = startReviewPooledProcess(requestContext);
    Task task = activitiProcessEngine.getTaskService().createTaskQuery().processInstanceId(processInf.getId()).singleResult();
    TasksClient tasksClient = publicApiClient.tasksClient();
    activitiProcessEngine.getTaskService().saveTask(task);
    Map<String, String> params = new HashMap<String, String>();
    params.put("select", "state,variables");
    HttpResponse response = tasksClient.update("tasks", task.getId(), null, null, "{\"state\":\"completed\",\"variables\":[{\"name\":\"wf_reviewOutcome\",\"value\":\"Approve\",\"scope\":\"local\"},{\"name\":\"bpm_comment\",\"value\":\"approved by me\",\"scope\":\"local\"}]}", params, "Failed to update task", 200);
    HistoricTaskInstance historyTask = activitiProcessEngine.getHistoryService().createHistoricTaskInstanceQuery().taskId(task.getId()).includeProcessVariables().includeTaskLocalVariables().singleResult();
    String outcome = (String) historyTask.getTaskLocalVariables().get("bpm_outcome");
    assertEquals("Approve", outcome);
}
Also used : Task(org.activiti.engine.task.Task) HistoricTaskInstance(org.activiti.engine.history.HistoricTaskInstance) HashMap(java.util.HashMap) TasksClient(org.alfresco.rest.workflow.api.tests.WorkflowApiClient.TasksClient) HttpResponse(org.alfresco.rest.api.tests.client.HttpResponse) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) ProcessInfo(org.alfresco.rest.workflow.api.model.ProcessInfo) Test(org.junit.Test)

Example 4 with ProcessInfo

use of org.alfresco.rest.workflow.api.model.ProcessInfo in project alfresco-remote-api by Alfresco.

the class TaskWorkflowApiTest method testGetTaskVariablesReview.

@Test
public void testGetTaskVariablesReview() throws Exception {
    RequestContext requestContext = initApiClientWithTestUser();
    ProcessInfo processInstance = startParallelReviewProcess(requestContext);
    try {
        Task task = activitiProcessEngine.getTaskService().createTaskQuery().processInstanceId(processInstance.getId()).taskAssignee(requestContext.getRunAsUser()).singleResult();
        assertNotNull(task);
        TasksClient tasksClient = publicApiClient.tasksClient();
        JSONObject variables = tasksClient.findTaskVariables(task.getId());
        assertNotNull(variables);
        JSONObject list = (JSONObject) variables.get("list");
        assertNotNull(list);
        JSONArray entries = (JSONArray) list.get("entries");
        assertNotNull(entries);
        // Check pagination object for size
        JSONObject pagination = (JSONObject) list.get("pagination");
        assertNotNull(pagination);
        assertEquals(42L, pagination.get("count"));
        assertEquals(42L, pagination.get("totalItems"));
        assertEquals(0L, pagination.get("skipCount"));
        assertFalse((Boolean) pagination.get("hasMoreItems"));
    } finally {
        cleanupProcessInstance(processInstance.getId());
    }
}
Also used : Task(org.activiti.engine.task.Task) JSONObject(org.json.simple.JSONObject) TasksClient(org.alfresco.rest.workflow.api.tests.WorkflowApiClient.TasksClient) JSONArray(org.json.simple.JSONArray) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) ProcessInfo(org.alfresco.rest.workflow.api.model.ProcessInfo) Test(org.junit.Test)

Example 5 with ProcessInfo

use of org.alfresco.rest.workflow.api.model.ProcessInfo in project alfresco-remote-api by Alfresco.

the class TaskWorkflowApiTest method testDeleteTaskItem.

@Test
@SuppressWarnings("unchecked")
public void testDeleteTaskItem() throws Exception {
    final RequestContext requestContext = initApiClientWithTestUser();
    String otherPerson = getOtherPersonInNetwork(requestContext.getRunAsUser(), requestContext.getNetworkId()).getId();
    RequestContext otherContext = new RequestContext(requestContext.getNetworkId(), otherPerson);
    String tenantAdmin = AuthenticationUtil.getAdminUserName() + "@" + requestContext.getNetworkId();
    RequestContext adminContext = new RequestContext(requestContext.getNetworkId(), tenantAdmin);
    // Create test-document and add to package
    NodeRef[] docNodeRefs = createTestDocuments(requestContext);
    ProcessInfo processInfo = startAdhocProcess(requestContext, docNodeRefs);
    final Task task = activitiProcessEngine.getTaskService().createTaskQuery().processInstanceId(processInfo.getId()).singleResult();
    assertNotNull(task);
    activitiProcessEngine.getTaskService().setAssignee(task.getId(), null);
    try {
        TasksClient tasksClient = publicApiClient.tasksClient();
        tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
        try {
            tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // delete item as admin
        JSONObject createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        JSONObject result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        JSONObject itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        publicApiClient.setRequestContext(adminContext);
        tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
        try {
            tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // delete item with candidate user
        createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        activitiProcessEngine.getTaskService().addCandidateUser(task.getId(), otherPerson);
        publicApiClient.setRequestContext(otherContext);
        tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
        try {
            tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // delete item with not involved user
        createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        activitiProcessEngine.getTaskService().deleteCandidateUser(task.getId(), otherPerson);
        publicApiClient.setRequestContext(otherContext);
        try {
            tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(403, e.getHttpResponse().getStatusCode());
        }
        // delete item with user from candidate group with no assignee
        List<MemberOfSite> memberships = getTestFixture().getNetwork(otherContext.getNetworkId()).getSiteMemberships(otherContext.getRunAsUser());
        assertTrue(memberships.size() > 0);
        MemberOfSite memberOfSite = memberships.get(0);
        String group = "GROUP_site_" + memberOfSite.getSiteId() + "_" + memberOfSite.getRole().name();
        activitiProcessEngine.getTaskService().deleteCandidateUser(task.getId(), otherContext.getRunAsUser());
        activitiProcessEngine.getTaskService().addCandidateGroup(task.getId(), group);
        publicApiClient.setRequestContext(otherContext);
        createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
        try {
            tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // delete item with user from candidate group with assignee
        activitiProcessEngine.getTaskService().setAssignee(task.getId(), requestContext.getRunAsUser());
        publicApiClient.setRequestContext(requestContext);
        createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        publicApiClient.setRequestContext(otherContext);
        try {
            tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(403, e.getHttpResponse().getStatusCode());
        }
        publicApiClient.setRequestContext(requestContext);
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
        try {
            tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // invalid task id
        publicApiClient.setRequestContext(requestContext);
        try {
            tasksClient.deleteTaskItem("fakeid", docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // invalid item id
        try {
            tasksClient.deleteTaskItem(task.getId(), "fakeid");
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
        // delete item from completed task
        createItemObject = new JSONObject();
        createItemObject.put("id", docNodeRefs[0].getId());
        result = tasksClient.addTaskItem(task.getId(), createItemObject.toJSONString());
        assertNotNull(result);
        assertEquals(docNodeRefs[0].getId(), result.get("id"));
        itemJSON = tasksClient.findTaskItem(task.getId(), docNodeRefs[0].getId());
        assertEquals(docNodeRefs[0].getId(), itemJSON.get("id"));
        TenantUtil.runAsUserTenant(new TenantRunAsWork<Void>() {

            @Override
            public Void doWork() throws Exception {
                activitiProcessEngine.getTaskService().complete(task.getId());
                return null;
            }
        }, requestContext.getRunAsUser(), requestContext.getNetworkId());
        try {
            tasksClient.deleteTaskItem(task.getId(), docNodeRefs[0].getId());
            fail("Expected exception");
        } catch (PublicApiException e) {
            assertEquals(404, e.getHttpResponse().getStatusCode());
        }
    } finally {
        cleanupProcessInstance(processInfo.getId());
    }
}
Also used : Task(org.activiti.engine.task.Task) TasksClient(org.alfresco.rest.workflow.api.tests.WorkflowApiClient.TasksClient) MemberOfSite(org.alfresco.rest.api.tests.client.data.MemberOfSite) ProcessInfo(org.alfresco.rest.workflow.api.model.ProcessInfo) PublicApiException(org.alfresco.rest.api.tests.client.PublicApiException) PublicApiException(org.alfresco.rest.api.tests.client.PublicApiException) NodeRef(org.alfresco.service.cmr.repository.NodeRef) JSONObject(org.json.simple.JSONObject) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) Test(org.junit.Test)

Aggregations

ProcessInfo (org.alfresco.rest.workflow.api.model.ProcessInfo)40 RequestContext (org.alfresco.rest.api.tests.client.RequestContext)36 Test (org.junit.Test)36 PublicApiException (org.alfresco.rest.api.tests.client.PublicApiException)26 JSONObject (org.json.simple.JSONObject)26 ProcessesClient (org.alfresco.rest.workflow.api.tests.WorkflowApiClient.ProcessesClient)16 Task (org.activiti.engine.task.Task)13 HashMap (java.util.HashMap)12 JSONArray (org.json.simple.JSONArray)11 NodeRef (org.alfresco.service.cmr.repository.NodeRef)10 TasksClient (org.alfresco.rest.workflow.api.tests.WorkflowApiClient.TasksClient)8 ArrayList (java.util.ArrayList)6 MemberOfSite (org.alfresco.rest.api.tests.client.data.MemberOfSite)5 HistoricProcessInstance (org.activiti.engine.history.HistoricProcessInstance)4 TestNetwork (org.alfresco.rest.api.tests.RepoService.TestNetwork)4 Date (java.util.Date)3 List (java.util.List)3 HttpResponse (org.alfresco.rest.api.tests.client.HttpResponse)3 Variable (org.alfresco.rest.workflow.api.model.Variable)3 Calendar (java.util.Calendar)2