-
1. Re: Flow through many tasks sequentially
pedrosacosta Nov 2, 2005 6:13 AM (in response to pedrosacosta)I've used
TaskInstance taskInstance = (TaskInstance) processInstance.getTaskMgmtInstance() .getTaskInstances().iterator().next();
But it doesn't work.
when i do
System.out.println("Size of TaskList " + processInstance.getTaskMgmtInstance().getTaskInstances().size());
the size is 1 and not 3.
I don't understand.
those tasks are assigned to different users. -
2. Re: Flow through many tasks sequentially
pedrosacosta Nov 2, 2005 6:20 AM (in response to pedrosacosta)i've also used
taskInstance.getToken().signal();
but it doesn't work. -
3. Re: Flow through many tasks sequentially
pedrosacosta Nov 2, 2005 6:47 AM (in response to pedrosacosta)I resolved the problem.
The solution is
taskInstance=(TaskInstance)processInstance.getTaskMgmtInstance().getUnfinishedTasks(processInstance.getRootToken()).iterator().next(); -
4. Re: Flow through many tasks sequentially
kukeltje Nov 2, 2005 6:50 AM (in response to pedrosacosta)simple you do not transition to tasks but to task nodes.
e.g. to='task2' should be to='task-node2'
and pay attention to capitalization -
5. Re: Flow through many tasks sequentially
pedrosacosta Nov 2, 2005 7:54 AM (in response to pedrosacosta)you're right kukeltje. But, the solution for my problem is still the one that i said.
-
6. Re: Flow through many tasks sequentially
kukeltje Nov 2, 2005 8:05 AM (in response to pedrosacosta)If you want to iterate over unfinished tasks just for that processinstance you are correct.
-
7. Re: Flow through many tasks sequentially
pedrosacosta Nov 8, 2005 5:00 AM (in response to pedrosacosta)I've changed the code, and the problem has appeared again.
To change through Task-nodes, saying
taskinstance.end()
is enough?
If i try to use
taskInstance = (TaskInstance) iterator.next();
to call the next task-node, the program simply blows up. I get this exception:java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.nextEntry(Unknown Source) at java.util.HashMap$KeyIterator.next(Unknown Source) at com.sample.WorkFlow.ListaTarefasTask(WorkFlow.java:83) at com.sample.Starter.main(Starter.java:11) Exception in thread "main"