In SharePoint 2013, A list has few items and to each item few tasks are attached. Each task is associated with a workflow. But when a task is deleted the corresponding workflow to the deleted item is still running. How to retrieve such orphaned workflows and find the total count of such workflows in the site.
-
What are you describing are not oprhaned workflows, cause you delete the workflow task, but the item is still in library or list right? Orphaned workflow is when you delete the main item where the workflow were started.– Zdeněk VinduškaCommented Jan 17, 2019 at 11:17
-
No, the item itself is itself getting deleted. But the workflow is still running.– sushma manneCommented Jan 17, 2019 at 12:31
-
a few years ago, I tried this codeproject.com/Tips/446571/Delete-an-Orphaned-Workflow– JohnKelheimCommented Jan 17, 2019 at 15:22
Add a comment
|
1 Answer
here is script for getting all workflows from Site. or here the second one.
Finding orphaned workflows is difficult, you can check listed workflows above or check it in Content Database. I strongly don't recommend to work in database, but here is short example.
You can remove orphaned workflows through Workflow Manager. Example here.