Workaround for the situation that SharePoint auto cleanup job deleted workflow history

Issue description:

In case you encounter the SharePoint auto deletes workflow history issue. so far there are 3 suggestions


1. Disable the SharePoint auto cleanup job ( )

2. Increase the number of days the auto cleanup job will delete history.

Changing the SPWorkflowAssociation.AutoCleanupDays property


The methods above absolutely will have permission issue. In some situations users do need to keep workflow history, we can suggest the workaround below. There will be an auditlink column which contains the workflow history link to see the workflow histories which associated to the document. This workaround works because the auto cleanup job actually deletes the workflow association instead of the workflow history. You can refer to the following for detailed information:

Workaround for Missing Workflow History