It is recommended that you terminate a process instance only in exceptional situations. The process instance is terminated immediately without waiting for any outstanding subprocesses or activities. Process instances that are terminated using the Java Message Service (JMS) interface are not compensated.
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);The process instance is terminated immediately without waiting for any outstanding subprocesses or activities. If the JMSReplyToQueue value 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.