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

    How to remove a task instance?

    Arnold H Newbie

      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?
          Arnold H Newbie

          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.