Publishing a workflow to multiple lists and libraries (in same site!)

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.

  1. Query XMLSelect the XML source as URL and key in the URL. It is the URL where the workflow file is stored.1
  2. 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
    2

    Replacing ‘&’
    3

    Replacing ‘<‘
    4

    Replacing ‘>’
    5
  3. 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.

    6

    This action will publish the workflow to the Employee list with the name – EmpTest.

All steps together will look like below

7

 

Happy Nintexing 🙂

Work is in progress to publish workflows to other/sub-sites.

Advertisements

2 thoughts on “Publishing a workflow to multiple lists and libraries (in same site!)

  1. Pingback: Publishing a Nintex workflow to lists & libraries in multiple sites | My Learnings

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s