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

Lalit Bhatia do-not-reply at jboss.com
Thu Jun 24 06:31:26 EDT 2010


Lalit Bhatia [http://community.jboss.org/people/lalitbhatia] replied to the discussion

"Find Task by Process Def and group"

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

--------------------------------------------------------------
A similar situation where If I have Process Instance key/business key and Group and I need to figure out list of Tasks then I guess following piece of code should work -

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

     ProcessInstanceQuery piQuery = new ProcessInstanceQueryImpl();
     ProcessInstance pi = piQuery.processInstanceKey(businessKey).list().get(0);

        // find the Task by process instance id and user id - since the task is assigned to user group
        // user associated with group will also be candidate
     TaskQuery tQuery = taskService.createTaskQuery().processInstanceId(pi.getId()).candidate(userId);

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

what do you say guys?

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

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

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/fb66bd28/attachment.html 


More information about the jboss-user mailing list