[jboss-user] [jBPM] - getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups

Justin Robbins do-not-reply at jboss.com
Wed Jul 11 15:26:44 EDT 2012


Justin Robbins [https://community.jboss.org/people/jhrobbin] created the discussion

"getTasksAssignedAsPotentialOwnerByStatus fails when User has no groups"

To view the discussion, visit: https://community.jboss.org/message/747599#747599

--------------------------------------------------------------
Hello,

I wasn't sure if I should create a JIRA issue for this or if perhaps I'm simply doing something wrong.

*Summary:*
We are using 5.4 snapshot and after a recent update we are now getting exceptions in SyncTaskServiceWrapper.getTasksAssignedAsPotentialOwnerByStatus when the User is not a member of any groups.

*Detail:*
We have implemented theUserGroupCallback interface for use with our own implementation for user and group management.  We have some users who are not a member of any groups.  For those users, UserGroupCallback.getGroupsForUser will return empty list.

However, even though there are no groupIds, TaskServiceSession.getTasksAssignedAsPotentialOwnerByStatus still runs the named query "TasksAssignedAsPotentialOwnerByStatus*WithGroups*" and supplies an empty list parm to the query.  

When the query is run with an empty list it fails with the following exception:
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [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, actualOwner, createdBy, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processSessionId) from org.jbpm.task.Task t left join t.taskData.createdBy as createdBy left join t.taskData.actualOwner as actualOwner left join t.subjects as subject left join t.descriptions as description left join t.names as name, org.jbpm.task.OrganizationalEntity potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in () ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) 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 (:status0_, :status1_, :status2_, :status3_) and t.taskData.expirationTime is null]

Please advise.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/747599#747599]

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/20120711/51bb9e22/attachment.html 


More information about the jboss-user mailing list