This content has been marked as final.
Show 2 replies
-
1. Re: Cancelling dynamically created tasks
kukeltje Dec 17, 2008 4:50 PM (in response to redguy666)when I tried to fetch pending tasks with executionContext.getTaskMgmtInstance().getTaskInstances()
From where? -
2. Re: Cancelling dynamically created tasks
romain.lamarche Dec 23, 2008 7:43 AM (in response to redguy666)Hi,
Try to call setSignaling(false) before call cancel() and it should works.
The problem is that you call "cancel()" in an event (i think) and the token is locked. And calling cancel make the task to signal the token, which is not what you want, and you can't do this from an event.
Another way is to add end-task="true" in the task-node (XML definition).
This will make all tasks not ended to be canceled when the token leave the task-node. So it may not do what you want, because you want to cancel all tasks only when the "reject" transition is taken.