[jboss-user] [JBoss jBPM] - Retriving task instances for user
dlipski
do-not-reply at jboss.com
Tue Jul 18 12:21:14 EDT 2006
Hi
I have one more problem using jBPM.
If i want to get all task instances for actor (push/pull) do i have to start from getTaskMgmtSession().findTaskInstances(actorID) always?
Is there any other way ?
If no, how to get task instances gropued by task nodes ?
Something like this doesn't work (ClassCast):
List<TaskInstance> tasks = workflowConfig.createJbpmContext().getTaskMgmtSession().findTaskInstances(actorId);
|
| Map<TaskNode, List<TaskInstance>> instancesGrouped = new HashMap<TaskNode, List<TaskInstance>>();
| for(TaskInstance task : tasks)
| {
| //ClassCast here
| TaskNode taskNode = (TaskNode)task.getToken().getNode();
| List<TaskInstance> instances = instancesGrouped.get(taskNode);
| if(instances == null)
| {
| instances = new ArrayList<TaskInstance>();
| instancesGrouped.put(taskNode,instances);
| }
| instances.add(task);
|
| }
Maybe there is other, simplier way to do this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958872#3958872
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958872
More information about the jboss-user
mailing list