query.taskCandidateUser issue

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2012 04:29 AM
Hi,
When i have a user task like this
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)
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 ?
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 ?
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2012 04:00 AM
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,
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,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2012 06:44 AM
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).
