[jboss-user] [jBPM] - Re: Tasks Assigned to Groups Not Found
Marcio Dantas
do-not-reply at jboss.com
Wed Oct 3 20:02:46 EDT 2012
Marcio Dantas [https://community.jboss.org/people/marcio.dantas] created the discussion
"Re: Tasks Assigned to Groups Not Found"
To view the discussion, visit: https://community.jboss.org/message/763074#763074
--------------------------------------------------------------
Guys,
in the "New' query above there's a cartesian product that brought me incorrect results.
Below, I change the query to use a left join.
select
new org.jbpm.task.query.TaskSummary(
t.id,
t.taskData.processInstanceId,
name.text,
subject.text,
description.text,
t.taskData.status,
t.priority,
t.taskData.skipable,
owner,
creator,
t.taskData.createdOn,
t.taskData.activationTime,
t.taskData.expirationTime)
from
Task t
left join t.taskData.createdBy as creator
left join t.taskData.actualOwner as owner
left join t.subjects as subject
left join t.descriptions as description
left join t.names as name
left join t.peopleAssignments.potentialOwners potentialOwners
where
( potentialOwners.id = :userId or potentialOwners.id in (:groupIds) ) and
(
name.language = :language
or t.names.size = 0
) and
(
subject.language = :language
or t.subjects.size = 0
) and
(
description.language = :language
or t.descriptions.size = 0
) and
t.taskData.status in ('Created', 'Ready', 'Reserved', 'InProgress', 'Suspended') and
t.taskData.expirationTime is null
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/763074#763074]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121003/877eba9f/attachment.html
More information about the jboss-user
mailing list