hardyj

Workflow Version Control in NW365

Blog Post created by hardyj Employee on Mar 26, 2017

Introduction

 

Nintex for 365 does not currently support versioning for workflows. Importing a workflow on top of a current workflow and publishing with the same name will result in irretrievable loss of the current workflow. Up until now Nintex for 365 has not allowed the importing of a workflow over an existing workflow by blocking publishing under the same name. This however, prevents customers from following their workflow (software) development and release processes and has attracted many votes on the Nintex Uservoice site.

 

Nintex has released a change to the interface for importing that allows the user (with several warnings), to import a workflow on top of an existing workflow and publish under the same name. The possibility of inadvertently over-writing and therefore losing a workflow still exists.

 

Nintex suggests the following process to manage workflow versions in a controlled way that will also allow retrieval of an inadvertently overwritten workflow.

 

SharePoint Document Libraries

 

SharePoint online supports versioning in document libraries. Implementing workflow versioning can be done by treating an exported workflow design as a document in a “workflow version” document library . Also to capture other useful version information in the metadata stored in the document library such as who the designer was, when did this version become the production version and what was the reason for the update etc. Or any other information the business scenario requires.

 

Example Implementation

 

What follows is a simple implementation of this concept which may be extended to suite a business’s needs.

First create a suitable Document library in a site with the appropriate access configurations to meet your organisations needs and policies. In this example, I have:

 

  1. Created a Document Library named “Workflow Versions” and enabled versioning with check out/check in enabled (to limit the number of minor versions created each time a metadata value is edited rather than the workflow).
  2. Added columns, for example, Production Date and Authorized by to give the following metadata structure (along with the default SP document library columns, not all of which are displayed).

 

Example Columns

 

Workflow versioning document library columns

 

Storing Workflow versions in the Document Library

 

A new workflow – i.e. no prior versions in the document library:

  • Publish the workflow and export the workflow to a temporary location.
  • Upload the initial version (this will create a new item in the Document library) and check it out.
  • Edit the metadata (columns) as required.
  • Check in the item selecting major version when, all columns are updated .
  • Fill in the version comment.
  • Save.

 

New version of an existing workflow in the document library:

  • Open the existing workflow in the Nintex designer.
    Import the new version of the workflow(over the top of the existing version – this assumes that the existing version has been save previously in the “Workflow Versions” document library. If not then export and save in the document Library before importing the new version).
  • Make any design changes necessary to make this workflow operate on this site (e.g. references to lists).
  • When done, publish and export the workflow to a temporary location.
  • Upload this new version into the “Workflow Versions” Document library, accept the warning to overwrite and check it out (or configure check out by default).
  • Edit the metadata (columns) as required.
  • Check in the item selecting major version, when all columns are updated .
  • Fill in the version comment.
  • Save.

The “Workflow Versions” document library contains all versions of production workflows and can serve as a reference to determine which version of the workflow was operational in any given period, who authorized it (if a metadata column was created to capture this) and the reason for the update.

 

To view prior versions (this is SharePoint functionality for any document Library):

  • Navigate to your list, for example “Workflow Versions” .
  • Select the document - in our case the workflow design (.nwp file) that you wish to review.
  • Click on the three periods (...), either in the toolbar or on the selected item and select Version History from the drop down menu.
  • The version history and all columns set to display in the default (All Items) view appear in a window. You may manage the retention or deletion of prior versions in this window.

 

To restore a workflow design to a previous version:

  • Follow the steps in "To view prior versions" above.
  • Click on or right click on the Modified Date entry of the version you wish to recover
  • "Save As" to a temporary location.
  • Open the current workflow in the Nintex designer
  • Import this saved version over the current version and publish under the same name.
  • You have restored or rolled back the production workflow to the earlier version.
  • Upload this same version back to the workflow document library using the steps above, to make this the current version in the library.

 

Conclusion

Using a SharePoint document library with versioning enabled combined with the capability to import and publish under the same name, provides:

  • full recoverability of prior workflow designs
  • management of workflow developments and changes
  • enables workflow development and release practices for Nintex Workflow for 365.

Outcomes