Publishes a new workflow from the contents of a Nintex Workflow workflow (.nwf) file, specified as a string.


public bool PublishFromNWFXmlNoOverwrite(
	string workflowFile,
	string listName,
	string workflowName,
	bool saveIfCannotPublish


Type: System.String

Optional. An XML-encoded string, representing the contents of a NintexWorkflow workflow (.nwf) file.

Type: System.String

Optional. The name of a SharePoint list. If a value is not specified, the workflow is saved as a site workflow; otherwise, the workflow is saved to the specified list as a list workflow.

Type: System.String

Optional. The name of the workflow to be saved. If a value is not specified, the name specified in the contents of the Nintex Workflow 2013 export (.nwf) file is used; otherwise, the specified name is used.

Type: System.Boolean

Required. Set to true to save the workflow if validation errors prevent publishing the workflow; otherwise, set to false.


Type: Boolean

true if the workflow is successfully published.


A Nintex Workflow workflow (.nwf) file is an XML file created by exporting an existing workflow from the NintexWorkflow designer. For more information about Nintex Workflow export files, see Export files.

This method cannot convert list workflows to site workflows, or site workflows to list workflows. If the export file contains the definition for a reusable or list workflow, you must publish it to a SharePoint list. If the export file contains the definition for a site workflow, you must publish it to a SharePoint site. Otherwise, an error occurs.

This method first validates the workflow prior to publication. If a workflow with the same name already exists, this method then returns an error. Otherwise, this method then creates and publishes a new workflow.

If you want to skip validation or overwrite an existing workflow, the following related methods are available:

This method publishes a workflow, optionally attempting to save the workflow only if an error occurs during validation or publication and the saveIfCannotPublish parameter is set to true. To save a workflow directly from the contents of a export file, without publishing the workflow, you can use the SaveFromNWFXml method, or any of the related methods.


The following example demonstrates how to use this operation to publish a workflow from the contents of a export file.


The following SOAP request attempts to publish a workflow named PublishedWorkflow, defined from the contents of a export file, to the TestContacts2 list, optionally saving the workflow if it cannot be published.

Note: A portion of the value for the workflowFile element has been removed for readability.

<soap:Envelope xmlns:soap="" xmlns:nin="">
            &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
            &lt;ExportedWorkflowWithListMetdata xmlns:xsd=&quot;; xmlns:xsi=&quot;


The following SOAP response indicates that the workflow was successfully published.

<soap:Envelope xmlns:soap="" 
      <PublishFromNWFXmlNoOverwriteResponse xmlns="">

See Also


Export files


Exporting and importing workflows







Web Service Reference