We have implemented the JBPM and are having similar problems trying to use a group as an assignment.
After reading the many forums here, it appears we can modify the
from org.jbpm.taskmgmt.exe.TaskInstance as ti
where ti.actorId = :actorId
and ti.isOpen = true
To include something like the query posted:
t.ID_ AS taskid,
t.NAME_ AS taskname,
t.DESCRIPTION_ AS taskdescription,
u.NAME_ AS userid,
t.START_ AS startdate,
t.DUEDATE_ AS duedate,
t.END_ AS enddate
FROM jbpm_taskinstance t
INNER JOIN jbpm_taskactorpool p ON t.ID_ = p.TASKINSTANCE_
INNER JOIN jbpm_pooledactor pa ON p.POOLEDACTOR_ = pa.ID_
INNER JOIN jbpm_id_group g ON pa.ACTORID_ = g.NAME_
INNER JOIN jbpm_id_membership m ON m.GROUP_ = g.ID_
INNER JOIN jbpm_id_user u ON u.ID_ = m.USER_
WHERE t.END_ IS NUL
Which fetches all tasks for a user that is in any of the groups.
This seems to work fine.
How can we merge these successfully in hibernate mappings, or has there been any other solution put forward to implement the group(NAME) usage.