cancel
Showing results for 
Search instead for 
Did you mean: 

Query task that assigned to me or candidate group I member

bekesizoltan
Champ in-the-making
Champ in-the-making
Hi,

I would like to show all the task (paged and ordered) that is assigned to me or the task is at a candidate group that I a member of.

I can do task query only for one case , but it would be great to merge the 2 kind (assigned to me, one of my groups is the candidate group results into one grid) of tasks .

Do anyone has idea how to do this?

Many Thanks,
Zoltan
2 REPLIES 2

tstephen
Champ on-the-rise
Champ on-the-rise
To query for tasks in more than one group at a time you need the patch attached to http://jira.codehaus.org/browse/ACT-796. The latest comment is that this should be in 5.9 (not yet released).

Once you have that I believe it is possible to combine assignee and candidateIn something like this:
List<Task> tasks = processEngine.getTaskService().createTaskQuery().taskAssignee("user").taskCandidateGroupIn("group1", "group2");
Hope this helps,
Tim

bekesizoltan
Champ in-the-making
Champ in-the-making
Hi,

At the end, today, I edited the org/activiti/db/mapping/Task.xml to deal with 3 different options:
1, taskAssignee is defined, and no candidate user and no candidate group
2, no taskAssignee is defined and (candidate user or group is defined)
3, both defined ( I used here left outer join to have all the results)

Regards,
Zotlan

To query for tasks in more than one group at a time you need the patch attached to http://jira.codehaus.org/browse/ACT-796. The latest comment is that this should be in 5.9 (not yet released).

Once you have that I believe it is possible to combine assignee and candidateIn something like this:
List<Task> tasks = processEngine.getTaskService().createTaskQuery().taskAssignee("user").taskCandidateGroupIn("group1", "group2");
Hope this helps,
Tim