RemoveWorkflowSchedule
Removes a workflow schedule for a site workflow from a site, or for a reusable or list workflow from a file in a SharePoint document library.
Syntax
public bool RemoveWorkflowSchedule( string fileUrl, string workflowName )
Parameters
- fileUrl
- Type: System.String
Optional. The absolute or relative URL of the file from which to remove a workflow schedule for a reusable or list workflow. If a relative URL is specified, the URL must be relative to the current SharePoint website.
To remove a workflow schedule for a site workflow, do not specify a value for this parameter.
- workflowName
- Type: System.String
Optional. The name of the site, reusable, or list workflow of the workflow schedule to be removed.
Returns
Type: Boolean
true if the workflow schedule was successfully removed; otherwise, false if the workflow schedule was not found.
Remarks
If the workflow specified in workflowName does not exist, the method returns an error. Otherwise, the method returns true if an existing workflow schedule for the specified workflow is found and removed, or false if an existing workflow schedule for the specified workflow cannot be found.
Example
The following example demonstrates how to use this operation to remove a workflow schedule for a list workflow from a file in a SharePoint document library.
Request
The following SOAP request attempts to remove a workflow schedule for the TestDocWorkflow list workflow from the text file named TestDocument.txt.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com"> <soap:Header/> <soap:Body> <nin:RemoveWorkflowSchedule> <nin:fileUrl>/Shared%20Documents/TestDocument.txt</nin:fileUrl> <nin:workflowName>TestDocWorkflow</nin:workflowName> </nin:RemoveWorkflowSchedule> </soap:Body> </soap:Envelope>
Response
The following SOAP response indicates that a workflow schedule for the specified list workflow was found and removed.
<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> <RemoveWorkflowScheduleResponse xmlns="http://nintex.com"> <RemoveWorkflowScheduleResult>true</RemoveWorkflowScheduleResult> </RemoveWorkflowScheduleResponse> </soap:Body> </soap:Envelope>