AnsweredAssumed Answered

claim, setAssignee and taskAssignee

Question asked by chantme on Oct 11, 2012
Latest reply on Oct 11, 2012 by frederikheremans1
Hello

I try to make my own experience with the APIs :)

If I do


// case 1
Task myTask = lstCandidateTask.get(0);
myTask.setAssignee(myUser);
List<Task> lstTask = taskServ.createTaskQuery().taskAssignee(myUser).list();

lstTask is empty

But if I do


// case 2
Task myTask = lstCandidateTask.get(0);
taskServ.claim(myTask.getId(), myUser);
List<Task> lstTask = taskServ.createTaskQuery().taskAssignee(myUser).list();

lstTask contains the assigned task to myUser.

I know that claim checks if the task is not already assigned.

But why in the first case the task does not appear assigned to myUser ?

(I use Activiti 5.10)

Thank you  :)  :)

Outcomes