cancel
Showing results for 
Search instead for 
Did you mean: 

Tasks candidate group with assigned user

aitor
Champ in-the-making
Champ in-the-making
How I can get the list of tasks that have a candidate group regardless of whether the tasks are assigned user or not?

The method
activitiRule.getTaskService().CreateTaskQuery().TaskCandidateGroup("sales");
ignores the assigned tasks.

In my application all users belonging to a group have read permission on the tasks of that group and I need to display them in your inbox.

Thanks.
3 REPLIES 3

aitor
Champ in-the-making
Champ in-the-making
OK, I solved the problem using createNativeTaskQuery().
I use Oracle database.

<code>
taskService.createNativeTaskQuery().sql("SELECT task.* FROM ACT_RU_TASK task, ACT_RU_IDENTITYLINK link WHERE task.ID_ = link.TASK_ID_ AND link.GROUP_ID_ IN(" + candidateGroupList + ")").list()
</code>

Where 'candidateGroupList' is a String variable containing the groups to search, separated by commas.

Good day.

udayakumar_p
Confirmed Champ
Confirmed Champ
we can combine the list returned by,
<code>
taskService.createTaskQuery().taskAssignee(userId).list();
and
taskService.createTaskQuery().taskCandidateGroup(userGroup).list();
</code>
Is that make sense?

hybaken
Champ in-the-making
Champ in-the-making
any non native query solution for taskCandidateGroupIn ?

Is there any way to get something like taskAssigneeIn(userList) ?