public string Export(string url, Workflow workflow, string path) { var nintexService = new NintexWorkflowWS { Url = string.Concat(url, NintexServiceUrl), Credentials = CredentialCache.DefaultCredentials }; if (!SpContext.IsFeatureActivated(url, NintexWorkflowFeatureId)) { throw new Exception(string.Format("Web feature \"Nintex Workflow 2010\" is not activated for the site {0}. Please activate and try again.", url)); } var workflowXml = nintexService.ExportWorkflow(workflow.Name, workflow.ListName, workflow.Category); var localFilePath = SaveWorkflowXmlToFile(workflow.Name, workflowXml, path); workflow.Serialize(localFilePath); return localFilePath; }