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
ObjectMessage message= queueSession.createObjectMessage();
// Specify the destination object replies are to be sent to message.SetJMSReplyTo(replyToQueue);
message.SetStringProperty("wf$verb", "forceTerminate"); message.SetStringProperty("wf$processInstanceName", "CustomerOrder");
// Send message queueSender.send(message);