Hi,
I am using activiti in my spring web application. Here I assigned task to particular group not to candidate user. Now, i need to display candidate user tasks and groups tasks individually. But both are coming with same tasks.
taskService.createTaskQuery().taskCandidateUser(user.getUsername()).list()
taskService.createTaskQuery().taskCandidateGroup(groupType).list()
I assigned only to group. why candidateUser also returns same tasks? Please let me know if anyone know about this.
Thanks
This is indeed the intended behaviour - if the user is a member of a group then they are automatically a candidate for any tasks for which the group is a candidate and the taskCandidateUser query will reflect that. You can see how this is implemented by looking at Activiti/TaskQueryImpl.java at 6.x · Activiti/Activiti · GitHub and Activiti/Task.xml at 6.x · Activiti/Activiti · GitHub - the method is automatically called in virtue of the mybatis config. You can find more explanation and a solution using a native SQL query in the thread getting a user's candidate tasks without the user's group tasks
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.