-
1. Re: End Node - End All Tasks
kukeltje Nov 25, 2008 4:54 AM (in response to tpaz)look at the end-complete-process attribute on an end node. But iirc, if you just have one end node that already should happen
-
2. Re: End Node - End All Tasks
mputz Nov 25, 2008 5:07 AM (in response to tpaz)I think things got mixed up here. The 'end-complete-process' attribute on end-state only makes sense in an end-state that appears in a leg of a fork, and which should end the complete process, see https://jira.jboss.org/jira/browse/JBPM-1181.
Ending a process does not end the taskInstances, that's the default behavior IMO. There is at least one JIRA issue for this, too https://jira.jboss.org/jira/browse/JBPM-392.
A workaround would be to end the taskinstances in an ActionHandler on the process-end event. -
3. Re: End Node - End All Tasks
tpaz Nov 25, 2008 6:23 AM (in response to tpaz)I tried the following handler, which seems straightforward:
public class EndAllTasks implements ActionHandler {
public void execute(ExecutionContext executionContext) throws Exception {
executionContext.getTaskMgmtInstance().endAll();
}
}
but I'm getting a concurrent exception.
I'm looking for a clean and simple solution.
Thanks, Tomer -
4. Re: End Node - End All Tasks
mputz Nov 25, 2008 8:24 AM (in response to tpaz)Using an ActionHandler with taskMgmtInstance.endAll() in the process-end event should work.
If you experience any issues, please create a unit test, let us know which version you are working with and show us the exception. -
5. Re: End Node - End All Tasks
kukeltje Nov 25, 2008 11:59 AM (in response to tpaz)Things did not get mixed up... there is a line missing from my post... probably wrong quoting again...My first line was:
If you have multiple end-nodes in your processdefinition and there is more then one token still active when the current token arrives in the specific end-node, this behaviour might occur.