cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Automation Master
Automation Master

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Do you mean using Purge Workflow Data? I used it to view In Progress workflows with deleted items in order to view the Preview Page for the instance.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Yes, I'm using Purge Workflow Data.  It's not showing the workflows for the deleted items.  I can see them using the Workflow Report Viewer web part, but when I query using Purge Workflow Data, they don't show in the results.

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Ok, not a big deal with more than one way. But when I query using a date, I am able to see those workflows in progress when running on deleted items.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Related to this, is there a way to see a list's orphaned workflows? I was able to use this method because I knew the ListItemID and was able to find the InstanceID from the Workflow History List.  But it would be useful if you could see all In Progress Workflows where the List Item no longer exists.

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

You can use the Workflow Reports Web Parts.  Here is a post on using these. Enable Reports on your Nintex Workflows .  One of the reports will show you all running workflows.  That's what I use to find the workflows.  It doesn't tell you which ones are orphaned, but when you click on the workflow, it will tell you if the list ID is no longer exists.

0 Kudos
Reply
Highlighted
Not applicable

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Hello, I tried Mike's solution but was unable to terminate the workflow or remove the workflow tasks associated with it.

Here's what my URL looks like after removing the querystring:

http://xxx/xxx/xxx/_layouts/NintexWorkflow/Preview.aspx?&InstanceId=9024cf3c-13a1-4800-bfe7-5538e80a...

I am able to terminate the workflow from here but after I refresh the page, the workflow status is still showing as "Running" and the tasks still exist in the system. Can someone tell me what I am doing wrong?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Hi Andrew Glasser

I have been trying to use NWAdmin operation of SyncTerminatedWorkflows to synchronize the out of sync workflows. It did work for some of the site. But i can still find a lot of workflows instances using SQL query where the item is deleted and the workflow state is still running. I did use the below command for the site but it says there are no out of sync workflows:

NWAdmin.exe -o SyncTerminatedWorkflows -url siteurl -terminateDeletedItems

Regards,

Simran Sachdeva

0 Kudos
Reply
Highlighted
Automation Master
Automation Master

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Well that query is probably returning the correct results. SyncTerminatedWorkflows must first query for workflows in SharePoint that have a workflow status that is different from the status stored by Nintex. Even with an orphaned workflow, the status could be the same and thus the result of no out of sync workflows. With no results, there will be nothing to delete.

Is Mike M​'s solution an option for you?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

Thanks Andrew for your quick response. But i can see that the item is deleted in SharePoint that means the SharePoint workflow should not be 'Running'.

But if i run the SyncTerminatedWorkflows for the above, it comes back no out of sync workflows. So how do we purge such items? There are thousands of such items so there is no way to go one by one and terminating the workflow manually. Can you please suggest something?

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: How do you terminate a workflow for an item that no longer exists?

Jump to solution

There is another solution to terminating running workflows as well. Select the 'Site Settings' from the 'Site Actions' menu, and then select the 'View reports' link. This allows you to view a number of different reports. Within the report options, select 'Workflows In Progress'. Once the screen opens, you have the option to input the workflow initiator and the workflow that you are trying to terminate. When I had to do this, I left the initiator option blank but selected the workflow that had been running on the deleted item. When the results show up, you will see every single instance of the selected workflow that is currently running (whether an active item or a deleted item).

The easiest way I found to pinpoint the workflows that needed to be terminated was to open 5 workflows at a time in new browser tabs. Then I would go to each tab individually and view the Item title. If the title was present, I would close the tab and leave the workflow running. If the title indicated that there was an error finding the item, I would then terminate the workflow. With no existing item title, it can be assumed that the workflow is running on a deleted item.

I hope this helps in cases where the URL option above does not work.

Reply