Terminate Old Instances of a Workflow

Document created by eharris04 Employee on May 20, 2016Last modified by vadim.tabakman@nintex.com on Sep 22, 2016
Version 2Show Document
  • View in full screen mode

This UDA can be used to terminate the old instance of a workflow that may be running on a particular list item.

 

AuthorVadim Tabakman
Long DescriptionDid you know that if you are running an instance of "WorkflowA" on an item, and you then go and make a change to the workflow, republish it, you will now be able to run another instance of "WorkflowA" on that item? This UDA helps to eliminate any old instances running on that item.
Dependencies

None

Support InfoVadim Tabakman - Nintex Workflow - Terminate Previous Instances of a Workflow - Vadim Tabakman
Compatibility

Nintex Workflow 2007

Nintex Workflow 2010

Nintex Workflow 2013

Platform

SharePoint Server 2007

SharePoint Server 2010

SharePoint Server 2013

Screenshots

Additional Information

Basically what it does is :

1. store the current workflow instance ID in a text variable (this is the current workflow and we don't want to touch it).

2. make a call to the Nintex Workflow web service to find out what running instances of this workflow there are on the current item

3. remove the XML namespace from the xml returned to us from the web service call.

4. query the xml to pull out only the Workflow Instance IDs.

5. iterate through each ID.

6. if the ID matches the current workflow instance ID, leave it alone.

7. if it doesn't match, it's an old version, and we need to terminate it.

8. make a web service call to the Nintex Workflow web service to terminate the instance of the workflow that matches the ID we are looking at.

 

Find out more or view other comments here Nintex Workflow - Terminate Previous Instances of a Workflow - Vadim Tabakman

Nintex Xchange Terms of Use Policy

Nintex makes no warranty or guarantee about the reliability, performance, quality, or functionality of any assets, and any assets you install are therefore provided as is. By downloading this asset, you agree to the terms of use.

Outcomes