09-18-2012 04:50 AM
taskService.createTaskQuery().taskCandidateGroupIn(roleNames).taskCandidateUser(user.getUsername()).orderByDueDate().asc().list();
but I got ActivitiException - Invalid query usage: cannot set both candidateUser and candidateGroupIn
<if test="candidateUser != null || candidateGroups != null">
and T.ASSIGNEE_ is null
and I.TYPE_ = 'candidate'
and
(
<if test="candidateUser != null">
I.USER_ID_ = #{candidateUser}
</if>
<if test="candidateUser != null && candidateGroups != null && candidateGroups.size() > 0">
or
</if>
<if test="candidateGroups != null && candidateGroups.size() > 0">
I.GROUP_ID_ IN
<foreach item="group" index="index" collection="candidateGroups"
open="(" separator="," close=")">
#{group}
</foreach>
</if>
)
</if>
10-05-2012 11:23 AM
Ok, Martin I'm convinced that this is indeed a valid use case.
I created http://jira.codehaus.org/browse/ACT-1395 to implement the feature
05-18-2017 10:39 PM
Thanks Martin for this use case and Joram. Indeed very required functionality.
I have seen this functionality in Tibco iProcess and AMX BPM.
10-18-2012 07:04 AM
The idea behind is that you don't need candidate groups once you set the assignee. It's only until the user gives up the task (assignee is set to null), that the task is put back into the pool if the group.
Which use case are you thinking of that would invalidate that?
What do you think about add a new api like below?
taskService.createTaskQuery().taskCandidateUserOrGroup("kermit", "manager");
List<String> groups = new ArrayList<String>();
groups.add("manager");
groups.add("ceo");
taskService.createTaskQuery().taskCandidateUserOrGroupIn("kermit", groups);
10-18-2012 07:27 AM
The idea behind is that you don't need candidate groups once you set the assignee. It's only until the user gives up the task (assignee is set to null), that the task is put back into the pool if the group.
Which use case are you thinking of that would invalidate that?
What do you think about add a new api like below?
taskService.createTaskQuery().taskCandidateUserOrGroup("kermit", "manager");
Yes, and second one for more candidate groups:
List<String> groups = new ArrayList<String>();
groups.add("manager");
groups.add("ceo");
taskService.createTaskQuery().taskCandidateUserOrGroupIn("kermit", groups);
10-22-2012 07:58 AM
Hi,
I tried select all task by candidateUser or candidateGroups in TaskQuery
List<Task> t1 = taskService.createTaskQuery().taskCandidateGroupIn(roleNames).orderByDueDate().asc().list();
List<Task> t2 = taskService.createTaskQuery().taskCandidateUser(user.getUsername()).orderByDueDate().asc().list();
foreach (Task t in t2){
if (!t1.contains(t){
t1.add(t);
}
}
return t1;
10-22-2012 09:34 AM
10-22-2012 10:48 AM
Dognose, that's a current workaround that can be used. However, it involves pulling all tasks in-memory and filtering there. Would be better to have DB do the heavy lifting and joining and not waste memory
10-22-2012 10:52 AM
10-24-2012 10:59 AM
07-13-2015 11:07 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.