Terminating a process instance using the EJB interface

Why and when to perform this task

Sometimes it is necessary for someone with process administrator rights to terminate a process instance that is known to be in an unrecoverable state. For example, when an application is invoked and fails and does not return to a dormant state.

It is recommended that you terminate a process instance only in exceptional situations. The process instance is terminated immediately without waiting for any outstanding activities. Process instances that are terminated are not compensated.

Steps for this task

  1. Retrieve the process instance to be terminated.
    ProcessInstanceData processInstance = 
           process.getProcessInstance("CustomerOrder");
  2. Terminate the process instance.
    PIID piid = processInstance.getID();
    process.forceTerminate(piid);
    The process instance is terminated immediately without waiting for any outstanding activities.



Searchable topic ID:   t6admtfe
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/wfapi/tasks/t6admtfe.html

Library | Support | Terms of Use | Feedback