1 Reply Latest reply on May 30, 2006 1:44 PM by aguizar

    How do I kill an existing process instance?

    sguimont

      The users of my system can cancel (terminate/kill) any started process instance at any steps. Can I terminate/end/kill a process instance?

      I try the ProcessInstance.end() method and the ProcessInstance.getRootToken().end() without success.

      Thanks!

        • 1. Re: How do I kill an existing process instance?
          aguizar

          Ending a process instance results in ending all tokens in it, firing a process-end event, notifying the super process (if any) and canceling the related timers.

          I guess you want jBPM to kill threads moving a token through the process graph, but that's outside the scope of jBPM. Apart from asynchronous continuations, jPBM runs in the client thread. If the client thread is managed, as is the case of servlet or EJB contexts, jBPM could not kill the thread without making someone mad.

          On the other hand, if you are running jBPM in a nonmanaged environment, then you created the threads and you should be able to terminate them on your side.