1 Reply Latest reply on Feb 3, 2008 9:31 PM by arnoldh

    How to remove a task instance?

      This question may be asked before, but I just cann't find the threads.

      I want to add and remove task instances dynamically in my code, and just can not find the proper methods. so can anyone please tell me a way?

      thanks a lot!

        • 1. Re: How to remove a task instance?

          I have just read the source code of TaskInstance.java, it seems the method "markAsCancelled()" will work, but unfortunately it is privte.
          and then I found the code below should work:

          taskInstance.setSignalling(false);
          taskInstance.cancel();

          as the "isSignalling" instance varialble is set to false, the task instance will keep silence and the token will not transit to other nodes, that should be the same effect as removing the task instance, I think.