mai-kel
Contributor

Terminate all workflows within a library

Hi there,

 

I have a list with an attached workflow that generates a document library.

Within this library there might be some files where another (approval) workflow is running.

 

I have the following task:

I have to build a workflow that terminates all approval-workflows within that library (as soon as a certain state is reached within the list).

 

How do I do that?

What I currently have, is the URL to the library and the name of the library.

How do I get the files included? How can I stop the workflows running on that particular files?

 

Cheers

mai-kel

0 Kudos
Reply
2 Replies
mai-kel
Contributor

Re: Terminate all workflows within a library

0 Kudos
Reply
SimonMuntz
Nintex How-To Center Expert
Nintex How-To Center Expert

Re: Terminate all workflows within a library

Hi,

 

Thank you for your question.
I would start by querying the library and returning all the item ID's of the workflows where the workflow name column is not blank or is in the status of in progress etc.

Then loop through the items and use the Call web service action with the Nintex Web Service to terminate the workflow on the item. If the workflow is not running or completed on the item and the web service tries to terminate the workflow nothing will happen and the workflow will continue.

Here is information on the web service to use.
https://help.nintex.com/en-US/sdks/sdk2013/#Reference/SOAP/NW_REF_SOAP_TerminateWorkflowByNameForLis...

 

0 Kudos
Reply