Through the Nintex Report web part, I can see a number of workflows that are in progress, but the item no longer exists. When I try to terminate them I get an error that says "Server was unable to process request. ---> Item does not exist. It may have been deleted by another user." Anyone know how you can terminate these workflows?
Solved! Go to Solution.
You could use the NWAdmin operation of SyncTerminatedWorkflows. This is to sync Nintex with SharePoint on the workflows status. But it also has an option to "terminateDeletedItems"
When specified, if a list item is not found, the workflow is treated as if it was cancelled. SharePoint does not cancel a workflow when an item is deleted, so the workflow can still display in reports. This option will tell Nintex Workflow to treat the workflow as cancelled.
Note: Security can cause this command to treat an item as deleted.
Note: Items in the site recycle bin will be treated as deleted.
NWAdmin.exe -o SyncTerminatedWorkflows -url teamsiteurl [-preScan] [-verbose] [-confirm] [-showMissingItems] [-terminateDeletedItems]
But, before all that, go to Purge Workflow Data from site settings. If you query for something that can find them, such as Last activity is before today, It will show a list of all workflow instances, and a link to the Workflow Instance of each. You can terminate workflows from there. But i'm not sure if it will show the orphaned ones. Well, thinking about this, you will probably get the same result.
I can't think of other non-code ways
You can terminate a Nintex workflow, even when the item no longer exists.
Before terminating the workflow, modfiy the URL by removing all the querystring (ListId, ItemId,WorkflowId,Source) and only have the InstanceId in the querystring...
Example : Your URL will look something like below,
Now, click terminate workflow and it should work....
Hope that helps.
That's so cool!
That's the same URL you get from going to the instance from View Reports that Brendan went to and also from Purge Workflow History.
So just go to the View Reports page, go to workflows in progress, select any workflow and modify the URL as he says just leaving instanceID and it actually works. I ran a test and confirmed in my environment.
Adding that to the bag of tricks.