Following is the WSDL definition of the Terminate operation:

 <wsdl:operation name="Terminate">
   <wsdl:input wsaw:Action="http://schemas.datacontract.org/2008/10/
     message="tns:IWorkflowInstanceManagement_Terminate_InputMessage" />
   <wsdl:output wsaw:Action="http://schemas.datacontract.org/2008/10/
     message="tns:IWorkflowInstanceManagement_Terminate_OutputMessage" />

The Terminate operation transitions a durable program instance from the active or suspended state to the completed state. It SHOULD perform the minimal possible work needed to transition the durable program instance to the completed state. A GUID MUST be passed to the operation as the value of the <instanceId> element to identify the durable program instance on which the operation is to be performed. The operation SHOULD return a SOAP fault message if one or more of the following conditions exist:

  • The value of the <instanceId> element is not in the correct format, as specified in [MS-DTYP] section 2.3.4.

  • The <instanceId> element is absent.

  • The value of the <instanceId> element does not exist in the Durable Program Instance Table on the server.

  • The durable program instance associated with the value of the <instanceId> element is in the completed state.

  • The server encounters an internal error while executing the Terminate operation.