[jboss-user] [jBPM] - Find Task by Process Def and group

Maciej Swiderski do-not-reply at jboss.com
Thu Jun 24 13:43:09 EDT 2010


Maciej Swiderski [http://community.jboss.org/people/swiderski.maciej] replied to the discussion

"Find Task by Process Def and group"

To view the discussion, visit: http://community.jboss.org/message/549551#549551

--------------------------------------------------------------
Hi,

let me tell you first that this is not the optimal way but you asked for API solution. I think you could achieve what you described in following steps:
1. find tasks for given process definition

taskService.createTaskQuery().processDefinitionId(defId).list()


2. Iterate over returned list of tasks and get partcipations for each

taskService.getTaskParticipations(taskId)


3. Check returned list of participations based on 

participation.getGroupId()

you can filter what groups you trying to find.

That probably should do what you want but not in the best way. You could find related jira issue or create new one to extend API if it comes to querying for tasks.

HTH
Maciej

--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[http://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/20100624/4fb079f4/attachment.html 


More information about the jboss-user mailing list