cancel
Showing results for 
Search instead for 
Did you mean: 

query.taskCandidateUser issue

heymjo
Champ on-the-rise
Champ on-the-rise
Hi,

When i have a user task like this

    <userTask id="createReport4" name="create the report4" activiti:candidateGroups="ROLE_CREATE"/>

then taskQuery.taskCandidateUser("myuser") will return this task if "myuser" has ROLE_CREATE. So far so good.

When i put a task without candidate restriction (meaning anyone could pick it up)


    <userTask id="createReport4" name="create the report4"/>

then taskQuery.taskCandidateUser("myuser") does not return this task, even though logically it should. For this task everyone is a 'candidate' user.

Also, from a taskbasket perspective, how would i query for such task ?
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

I understand your comment on this.
But what's implemented now is that we check if there's a identity link defined for that candidate user or group.
So if there are no identity links, it will see this as no match.
It would slow down the query if we add the additional "no identity link" variant.
But we could of course add a method to the TaskService that retrieves the tasks that have no identity links.
Would that solve your issue?

Best regards,

heymjo
Champ on-the-rise
Champ on-the-rise
But we could of course add a method to the TaskService that retrieves the tasks that have no identity links.

It would still be up to the API user then to merge both results and do two queries. I guess that's acceptable, as long as the distinction with .taskUnassigned() is clear (might not be for new users).