ExportWorkflow
Exports the contents of the specified workflow.
Syntax
public string ExportWorkflow( string workflowName, string listName, string workflowType )
Parameters
- workflowName
- Type: System.String
Optional. The name of the workflow to export.
- listName
- Type: System.String
Optional. The name of the SharePoint list associated with the workflow, to export a reusable or list workflow. To export a site workflow, do not specify a value for this parameter.
- workflowType
- Type: System.String
Optional. The workflow type identifier of the workflow to export. This parameter accepts the following values:
Value Description reusable Reusable workflow globallyreusable Globally reusable workflow list List workflow
If no value is specified, this is the default value.site Site workflow workflowapproval Workflow approval
Returns
Type: String
The XML representation of the exported workflow, contained in a CDATA element.
Remarks
The contents of the CDATA element returned by this method can be saved as a Nintex Workflow 2013 export (.nwf) file for later use, or can be specified as the value of the workflowFile parameter for other methods that can be used to save or publish workflows, such as PublishFromNWFXml and SaveFromNWFXml.
This method always exports the latest saved version of a workflow.
Example
The following example demonstrates how to use this operation to export a list workflow.
Request
The following SOAP request attempts to export the list workflow named Test Workflow from a SharePoint list named TestContacts1.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:nin="http://nintex.com"> <soap:Header/> <soap:Body> <nin:ExportWorkflow> <nin:workflowName>TestWorkflow</nin:workflowName> <nin:listName>TestContacts1</nin:listName> <nin:workflowType>list</nin:workflowType> </nin:ExportWorkflow> </soap:Body> </soap:Envelope>
Response
The following SOAP response returns the XML representation of the exported workflow.
Note: A portion of the value for the ExportWorkflowResult element has been removed for readability.
<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> <ExportWorkflowResponse xmlns="http://nintex.com"> <ExportWorkflowResult> <![CDATA[<?xml version="1.0" encoding="utf-8"?><ExportedWorkflowWithListMetdata>...</ExportedWorkflowWithListMetdata>]]> </ExportWorkflowResult> </ExportWorkflowResponse> </soap:Body> </soap:Envelope>
See Also
Concepts
Operations
Exporting and importing workflows
Reference
PublishFromNWFXmlSkipValidation