cancel
Showing results for 
Search instead for 
Did you mean: 

why task query list is not working for receive tasks

sakumar1
Champ in-the-making
Champ in-the-making
Below test case returns null attached bpmn file

   @Deployment(resources = {"org/activiti/test/my-process.bpmn20.xml"})
   public void test() {
      ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("my-process");
      assertNotNull(processInstance);
      Task task = activitiRule.getTaskService().createTaskQuery().processInstanceId(processInstance.getProcessInstanceId()).list().get(0);
       assertEquals("Activiti is awesome!", task.getName());
   }

}
is this is a issue ?

Regards,
Sakumar
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
A receive task is, contrary to its name, not a task for an end user. The TaskQuery will only return human task (i.e. userTasks)