In JBPM 3.x Token of a process instance is like an iterator which is pointing to the
current node of the process. So the node associated with the token is the currently active
node, which is the TaskNode for your case. In JBPM 3.x "Task" is not a node.
If you need to get the current active tasks then you can use TaskManagementInstance.
| ProcessInstance processInstance= getProcessInstance();
| //get the task management instance of the process instance
| TaskMgmtInstance taskManagementInstance = processInstance.getTaskMgmtInstance();
|
| //find the unfinished tasks
| Collection taskInstances =
taskManagementInstance.getUnfinishedTasks(processInstance.getRootToken());
|
You can also get a "Set" of tasks from the node obtained from the current
token.
| Token rootToken = processInstance.getRootToken();
| Node node = rootToken.getNode();
| if (node instanceof TaskNode) {
| Set<Task> tasks = ((TaskNode)node).getTasks();
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264439#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...