cancel
Showing results for 
Search instead for 
Did you mean: 

How do I find out the ID of the person who claim a group task?

sheing3003
Champ in-the-making
Champ in-the-making
How do I know who claims the group task?

In the next user task I want to show in the documentation, which variable do I use, I've tried the ${initiator} but it didn't work. Thanks.

assign to group –> fozzie claims it and approves it  –> kermit sees fozzie approved it then approved it
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi.

e.g. org.activiti.examples.bpmn.usertask.FinancialReportProcessTest#testProcess


    taskService.claim(task.getId(), "fozzie");
    tasks = taskService
      .createTaskQuery()
      .taskAssignee("fozzie")
      .list();

After the claim fozzie is new assignee.

sheing3003
Champ in-the-making
Champ in-the-making
This is assuming you know fozzie claimed it. What if I have no idea who's going to claim it?

assign to group -> fozzie claim it and approve it -> kermit sees that this has been approved by XXXX (fozzie in this case)

trademak
Star Contributor
Star Contributor
You just do a query in the HistoryService on completed user tasks and you look at the assignee there. That's the person that completed the task typically.

Best regards,