Requirement – I have a site that has around 40 country lists which have the same workflow. When there is a change in the workflow, there is a need to update the workflow in all 40 lists; which is practically impossible. Also, it wouldn’t be considered a good practice.
As most of the times, I knew there was a solution using Nintex. And the moment I found it, I fell even more in love with this workflow tool. It keeps surprising me as always!
Solution – Nintex workflow comes with a web method called PublishFromNWFXML that will do this job for us.
Update your workflow at the parent location and export it. Upload the nwf file to a library (here – Shared Documents) and create the below workflow on this library, that will update it to the multiple lists.
- Query XMLSelect the XML source as URL and key in the URL. It is the URL where the workflow file is stored.
- Regular ExpressionThis output has to be XML encoded. The inline function for some reason doesn’t seem to work, hence I go for the Regular expression to replace the below
- Configure web serviceConnect to the Nintex Workflow’s workflow.asmx web service and use the ‘PublishFromNWFXML’ web method. It takes below inputs
- Workflow File – The XML output generated after the query XML and multiple regular expressions.
- List Name – The name of the list or library (in the same site), where the workflow has to be published
- Workflow Name – This is the name that you would like your workflow in the new list to have. Ideally it can’t be the same name that has been used once in the site, hence it requires a different name.
- Save if cannot publish – As mentioned, it accepts a Boolean value. True indicates that the workflow be saved in the event that it is not published.
Result would be true/false depending upon the success of the execution of the web method.
This action will publish the workflow to the Employee list with the name – EmpTest.
All steps together will look like below
Happy Nintexing 🙂
Work is in progress to publish workflows to other/sub-sites.