Where are the definitions of SharePoint Designer 2013 workflows stored


  • Hi,

    I am trying to find out where exactly the workflow definitions for SharePoint Designer workflow are stored. So, when I go into SharePoint Designer and edit a workflow, where does that come from? I have seen a few posts that it is in the content database for the item it was created for. I see a Workflow and a WorkflowAssociations table, but i don't see the definitions of the workflows in them. 

    I found this: but it doesn't tell me where they are stored.

    Reason I am asking is because a couple of weeks ago, we lost some workflows. We pulled up SPD and went to the workflows and nothing. This was a new site, so we had a .wsp that we used to restore them. But I would feel safer if I knew what table or whatever, they were stored in.

    Thanks for any help,


    Friday, May 17, 2019 4:10 PM

All replies

  • The actual 2013 workflows themselves are stored in the web application content databases. Therefore, to restore them after the loss of the Workflow Manager framework system, you first need to rebuild the Workflow Manager system, re-attached it to SharePoint, and then re-publish the workflows.

    1. Ensure that all workflow 2013 related services are started.
    2. Make sure that Workflow Manager is fully integrated (ie, that you successfully executed Register-SPWorkflowService) and that you can create new 2013 workflows.
    3. Use an account that is: 1) member of farm admin group, 2) member of SharePoint_Shell_Access group of the content database to which the 2013 workflows (you are missing) were originally deployed to or has the db_owner role for that content database and 3) is a member of the Site Collection Administrator group of the site collection containing the 2013 workflows.
    4. Launch SPD 2013 using that account and connect to the site containing the workflows you want to restore.

    Do you see them now?

    Friday, May 17, 2019 4:49 PM
  • Stephan,

    Thanks for the quick reply.

    Yes, we got them back and I can see them now. I just wanted to 'see' them in a content database table to make sure they were being backed up properly.

    Do you know what table they are in? or what format they are stored in inside the table?


    Friday, May 17, 2019 5:50 PM
  • If you look in the content database, expand Tables, down there towards the bottom you'll see two tables:

    • dbo.Workflow
    • dbo.WorkflowAssociation

    They contain the information you are looking for.  One Note: these are for Windows Workflow Foundation 3.5 - AKA Workflow 2010.

    Friday, May 17, 2019 7:31 PM
  • Hi Monty,

    If you find any replies helpful to you, please remember to mark then as answers. 

    If you have solved the problem yourself, you can reply the solution and mark it as the answer. 

    It will help others who meet the similar question in this forum. 

    Thank you for your understanding.

    Best regards

    Chelsea Wu

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

    SharePoint Server 2019 has been released, you can click here to download it.
    Click here to learn new features. Visit the dedicated forum to share, explore and talk to experts about SharePoint Server 2019.

    Monday, May 20, 2019 8:28 AM