AnsweredAssumed Answered

Is DelegationState.PENDING effective?

Question asked by jieyee on Feb 8, 2012
Latest reply on Feb 8, 2012 by chaoyy
A method added to FinancialReportProcessTest.java in activiti-engine-examples.

    @Deployment(
     "org/activiti/examples/bpmn/usertask/FinancialReportProcess.bpmn20.xml"})   
    public void testDelegate() {
        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("financialReport");
        List<Task> tasks = taskService.createTaskQuery().taskCandidateUser("fozzie").list();
        assertEquals(1, tasks.size());
        Task task = tasks.get(0);
        String taskId = taks.getId();
        task.setOwner("fozzie");
        //taskService.cliam(taskId, "fozzie");
        task.setAssignee("fozzie");
        task.delegate("kermit");
        assertEquals(DelegationState.PENDING, task.getDelegationState());
        //taskService.resolveTask(taskId);
        taskService.complete(taskId);
        fail();
    }
the method taskService.complete(taskId) return with no error.

Outcomes