I am using Activiti 5.21.0 and I have a requirement like get task count which are assigned to an User or Assigned groups which are associated to that User.
TaskQuery taskQuery = taskService.createTaskQuery()
TaskQuery converted into SQL as follows. It didn't considered userId(i.e xprk911) while generating query. It looks like a bug in query preparation by taskQuery API or Am I making anything wrong in using taskQuery API for my requirement?
select count(distinct RES.ID_)
from ACT_RU_TASK RES
inner join ACT_RU_IDENTITYLINK I_OR0
on I_OR0.TASK_ID_ = RES.ID_
WHERE RES.ASSIGNEE_ = ?
and RES.SUSPENSION_STATE_ = 1
and (RES.ASSIGNEE_ IS NULL or
(RES.ASSIGNEE_ is null and I_OR0.TYPE_ = 'candidate' and (I_OR0.GROUP_ID_ IN (?,?))))