I've created a view on a Task List in order to show the outstanding tasks for each specific site user. However, I am noticing that tasks remain for items which have been deleted.
In the screen below there are two 'Workflow Task' items shown for 'Final TEST' which no longer exists.
Has anyone created a workflow to remove these orphaned task items before, or is there a simpler way to achieve this clean up?
have you tried a procedure described on the link?
every of your orphaned task list item will the most probably have (still) running workflow. if you remove workflow instance, task should be removed as well.
Yes I've tried this. It would appear that a purge does not delete any Task list items and instead purges the Nintex workflow content database.
I specifically need to remove items from the task list which point at a deleted list item.
ok, I see now.
if you want to give that possibility to task asignees you can use 'My workflow tasks' web part that provides that functionality Deleting orphan tasks from Nintex Workflow which keep showing up in Nintex Mobile.
other possibility is described here How do you terminate a workflow for an item that no longer exists? but that sounds to be a lot of manual work.
however, for one-time job and not too many tasks it might be sufficient.
if you need a general/automated solution then you will need to build a workflow or write a powershell script for that. have a look on Workflow.asmx web service.