Task list item(s) not deleting when List Item Deleted
Sharepoint 2007 SP2 I am the Site Collection Admin and Owner of the site I have a Infopath forms library that uses a workflow associated with a task list. When I delete the infopath form, due to rejection, the Task list items do not delete. I have to delete them manually. I know this is not the way Sharepoint works. Is this a Microsoft call support issue? This is same issue is also happening on regular custom list associated with a task list. chrisdoran
October 27th, 2010 8:36pm

Hi, Based on my test, SharePoint does not delete the workflow tasks related to an item when this list item was deleted. Instead, SharePoint runs a daily Workflow Auto Cleanup job to permanently delete workflow instances and related task entries that still exist 60 days after a workflow is completed or cancelled. For details about Workflow Cleanup Job, please see: http://technet.microsoft.com/en-us/library/cc298800(office.12).aspx I think a workaround is to terminate the workflow before delete it so that tasks will be permanently deleted and workflow is marked as canceled. Alternatively, item event handler can also be used to take care of this programmatically. Hope it helps. Thanks & Regards. Lily Wu TechNet Subscriber Support in forum If you have any feedback on our support, please contact tngfb@microsoft.com Lily Wu
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2010 11:23pm

I have not seen where a list item is deleted and the task workflow associated is not deleted with it. Please read the last line, thanks... http://msdn.microsoft.com/en-us/library/cc514224(office.12).aspx "SharePoint Server stores the workflow association data of a list or document libraryin the WorkflowAssociation table in the SharePoint content database. The WorkflowAssociation table stores the association between the workflow itself (using its workflow.xml GUID, which is stored in the BaseID column), the list or document library GUID, the task list GUID, the Workflow History GUID, the Web GUID, the auto-cleanup date of the Workflow History list, and the permissions. Windows SharePoint Services 3.0 implements its own WF persistence database by using a slightly modified WF persistence service. A persisted workflow instance is created by using binary serialization, compressed to save space, and then stored in the InstanceData image column in the Workflow table in the SharePoint content database, along with metadata such as workflow instance GUID, workflow association GUID, list GUID, list item GUID, Web GUID, workflow persistence size, last activity date, and workflow status. Workflow History and workflow task lists are regular SharePoint objects that are stored in the SharePoint content database with all other lists, list items, and documents. A timer job deletes the Workflow History and associated Task items for a workflow instance that was completed more than 60 days ago. (The cleanup does not delete the persisted workflow instance of a completed workflow.) Although you can adjust the duration by using the SPWorkflowTemplate.AutoCleanupDays property, we recommend that you not modify this setting. A longer duration causes more events to accumulate in the history database, which slows performance. If an item is deleted from a list or document library, all persisted workflow instances associated with the item—including tasks created by those workflows and workflow history list entries—are also deleted." UPDATE: Checking the list this afternoon, when the list item gets deleted it is also deleting the Task list items. I have made sure there are no pending workflow task on the list item. If there are the workflow task items they will not get deleted and I agree with Lily Wu. chrisdoran
October 28th, 2010 8:19am

I have not seen where a list item is deleted and the task workflow associated is not deleted with it. Please read the last line, thanks... http://msdn.microsoft.com/en-us/library/cc514224(office.12).aspx "SharePoint Server stores the workflow association data of a list or document libraryin the WorkflowAssociation table in the SharePoint content database. The WorkflowAssociation table stores the association between the workflow itself (using its workflow.xml GUID, which is stored in the BaseID column), the list or document library GUID, the task list GUID, the Workflow History GUID, the Web GUID, the auto-cleanup date of the Workflow History list, and the permissions. Windows SharePoint Services 3.0 implements its own WF persistence database by using a slightly modified WF persistence service. A persisted workflow instance is created by using binary serialization, compressed to save space, and then stored in the InstanceData image column in the Workflow table in the SharePoint content database, along with metadata such as workflow instance GUID, workflow association GUID, list GUID, list item GUID, Web GUID, workflow persistence size, last activity date, and workflow status. Workflow History and workflow task lists are regular SharePoint objects that are stored in the SharePoint content database with all other lists, list items, and documents. A timer job deletes the Workflow History and associated Task items for a workflow instance that was completed more than 60 days ago. (The cleanup does not delete the persisted workflow instance of a completed workflow.) Although you can adjust the duration by using the SPWorkflowTemplate.AutoCleanupDays property, we recommend that you not modify this setting. A longer duration causes more events to accumulate in the history database, which slows performance. If an item is deleted from a list or document library, all persisted workflow instances associated with the item—including tasks created by those workflows and workflow history list entries—are also deleted." chrisdoran
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 8:21am

Please take a look at my reply at http://social.technet.microsoft.com/Forums/en-US/sharepoint2010general/thread/2b763502-cb4e-4715-9b1d-d0f2639d2bfe
December 6th, 2010 3:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics