none
Understand workflow auto clean up job

    Question

  • Hi,

    I have created some workflows 2013  (with workflow manager) and I have a question about the workflow clean up.

    In my workflows, I have custom tasks lists associated to it with differents custom content type that inherit from workflow task content type.

    Those content type contains different metadata that users have to complete to go to the next step of the workflow. Data that are in those content type are really important for us because it contains business data. 

    I know that the workflow instance disappear 60 days after completion from the workflow menu. So I have created a unique ID for each item in the main list ( on which workflow is executed ) and I add this unique ID to different tasks created by workflow to allow me to link them and to retrieve related tasks.

    I have seen on internet that workflow auto clean up job can remove associated workflow tasks and for me this is impossible  because as explained tasks contains important business data. For the moment I have done a lot of workflow in this way and the tasks are not deleted even 2 years after completion.

    I would like to understand how this job works and if my tasks are safe.

    Thank you for your help.

    Alex

    Thursday, November 8, 2018 5:16 PM

All replies

  • I hope you can use th ebelow setting to increase the auto retention period

    https://blogs.msdn.microsoft.com/nishand/2007/09/11/changing-the-spworkflowassociation-autocleanupdays-property/


    Please remember to click Mark as Answer on the answer if it helps you

    Thursday, November 8, 2018 6:58 PM
  • This one as well

    https://blogs.msdn.microsoft.com/ahmedamin/2017/10/01/sharepoint-workflow-auto-cleanup/


    Please remember to click Mark as Answer on the answer if it helps you

    Thursday, November 8, 2018 6:59 PM
  • Hi,

    I have already seen those links, problem is that it doesn't answer to my question.

    I would like to know if my custom tasks will be deleted or not. I have workflows with custom tasks list and custom tasks content type inside.

    Nothing has been deleted in the custom tasks list but I would like to be sure that it will never be the case.

    So, I would like to know exactly what the Workflow auto clean up does.

    Thank you for your help.

    Alex

    Thursday, November 8, 2018 11:06 PM
  • Hi Alex,

    The job will not delete the tasks in your tasks list, and just the connection between the workflow and the workflow history is deleted after 60 days.

    So, your tasks will be not deleted by the timer job.

    There is a blog about this timer job for your reference:

    Sharepoint “Workflow Auto Cleanup” mystery

    Thanks,

    Wendy


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, November 9, 2018 10:10 AM
    Moderator
  • Hi Wendy,

    We have somes case with 2010 workflows that use the default task list.

    For those standard approval workflows, tasks from the default tasks list has been removed. That's why I would like to be sure that task from 2013 workflows will remained available all time.

    Thanks for your help,

    Alex

    Friday, November 9, 2018 2:31 PM