AnsweredAssumed Answered

Fetching tasks for candidateUser

Question asked by vvstraet on Aug 28, 2012
Latest reply on Apr 23, 2016 by sunilkumartk
Hello,

A key feature in a workflow-driven application is the tasklist in which tasks can be queried based on certain filters. I'm struggling however with the TaskQuery API as a very common feature is very difficult to implement: Query for a list that contains all the tasks I may get on my todo-list. This involves both the currently assigned tasks and the tasks that are assigned to someone else but for which I am a candidateUser.

I've looked around and found a solution that may solve my problem (but it complicates the Maven setup as a local repo has to be created with the change):
http://forums.activiti.org/en/viewtopic.php?f=4&t=1730&start=0&hilit=candidateuser

However, I think there's a much simpler solution:
Why does an assignee override the fact that someone is a candidateUser? My guess is that it is much simpler - besides being more correct - to add "TaskQuery.unassigned()" to the cases that rely on the task being unassigned than to make TaskQuery.taskCandidateUser(X) only return unassigned tasks …


As a side-note: I do not understand the TaskQuery.involvedUser(X) semantics, but it also does not seem to solve the above problem …

Outcomes