We have a bunch of tasks created by some items in a list (normal approval workflow). By mistake some users has "completed the tasks" by deleting the actual item that a task is based on, without setting the task completed.
Now the involved users keep getting reminder emails to complete the tasks but when clicking the link an error shows up, because the item does not exist...
How do I clean up this mess?
If you go into the recycle bin of the site the tasks should still be there. Click the check box next to the task and select return to original site.
Maybe I am missing something, but can't you just go into the Tasks list associated with the workflow and delete the offending Tasks?
To make this more automated, perhaps you can setup an Information Management Policy to automatically delete the Tasks after a certain number of days. I believe for a Task List you can setup the Expiration policy to occur a certain number of days/months/years after the Tasks scheduled Due Date.