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?
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.