DeleteWorkflow

Deletes the specified workflow.

Syntax

public void DeleteWorkflow(
	Guid listId,
	Guid workflowId,
	string workflowType
)

Parameters

listId
Type: System.Guid

Required. The identifier of the SharePoint list for the reusable or list workflow specified in workflowId. If a site workflow is specified in workflowId, set the value of this parameter to Guid.Empty (or 00000000-0000-0000-0000-000000000000).

workflowId
Type: System.Guid

Required. The identifier of the workflow to delete.

workflowType
Type: System.String

Optional. The workflow type identifier of the workflow to delete. This parameter accepts the following values:

ValueDescription
reusableReusable workflow
globallyreusableGlobally reusable workflow
listList workflow
siteSite workflow
userdefinedactionUser-defined action
workflowapprovalWorkflow approval

Example

The following example demonstrates how to use this operation to delete a site workflow.

Request

The following SOAP request attempts to delete a site workflow from the current site.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com">
   <soap:Header/>
   <soap:Body>
      <nin:DeleteWorkflow>
         <nin:listId>00000000-0000-0000-0000-000000000000</nin:listId>
         <nin:workflowId>7e7b5545-ad03-4989-b918-d047e19f075a</nin:workflowId>
         <nin:workflowType>site</nin:workflowType>
      </nin:DeleteWorkflow>
   </soap:Body>
</soap:Envelope>

Response

The following SOAP response indicates that the site workflow was successfully deleted.

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <DeleteWorkflowResponse xmlns="http://nintex.com"/>
   </soap:Body>
</soap:Envelope>

See Also

Concepts

Workflows

Operations

Creating and deleting workflows

Terminating workflows

Reference

Web Service Reference