[jboss-user] [JBoss jBPM] - Re: Task list of specified actor
kukeltje
do-not-reply at jboss.com
Tue Sep 25 10:32:02 EDT 2007
for those of you who want a shorter (jbpm api and java api) and jbpm 3.2 compliant version (the example above is 3.1)
| String currentUser = getUser(request).getUsername();
|
| IdentityService is = jbpmContext.getServices().getIdentityService();
| org.jbpm.identity.User jbpmUser = is.getUserByName(currentUser);
|
| //create list of possible id's (this includes groups) that
| //the current user is a member of.
| List actorsList = new ArrayList(jbpmUser.getMemberships());
|
| // add user in case he is the sole pooled actor not via a group
| actorsList.add(user);
| List pooledTaskInstances = jbpmContext.getGroupTaskList(actorsList);
| List userTaskInstanceList = jbpmContext.getTaskList(currentUser);
| userTaskInstanceList.addAll(pooledTaskInstances);
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4088433#4088433
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4088433
More information about the jboss-user
mailing list