Terminating a process instance using the JMS 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. Create a message, for example, an ObjectMessage message.
    ObjectMessage message= queueSession.createObjectMessage();
  2. (Optional)   Set the JMSReplyToQueue.
    If you do not want to receive a reply, this step is optional.
    // Specify the destination object replies are to be sent to
    message.SetJMSReplyTo(replyToQueue);
  3. Set the Java Message Service (JMS) properties.
    message.SetStringProperty("wf$verb", "forceTerminate");
    message.SetStringProperty("wf$processInstanceName", "CustomerOrder");
    
  4. Terminate the CustomerOrder process instance.
    // Send message
    queueSender.send(message);
    The process instance is terminated immediately without waiting for any outstanding activities. If JMSReplyToQueue is set, this action returns an empty reply message if the process instance was terminated successfully. The JMSCorrelationID value is set to the JMSMessageID value of the forceTerminate request. Neither properties nor payload are set on the reply message.



Searchable topic ID:   t6admtfj
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/t6admtfj.html

Library | Support | Terms of Use | Feedback