locked
Where are workflows saved RRS feed

  • Question

  • When a workflow instance has its state changed I assume it gets saved to a database.  Is this correct, or how would you check?  If Sharepoint saves the default workflows like 'Approval', 'Three-State', or 'Collect Feedback', is it possible for me to save my custom workflow to this same place?

    J
    Tuesday, February 16, 2010 8:25 PM

Answers

  • SharePoint workflows are persisted to the content database when they are inactive. Your workflows, if written as SharePoint workflows will also be automatically persisted the the database. If your worklfows are hosted outside of SharePoint (Console app for example) then you need to manage your own persistence.

    > how would you check

    Outside of looking the content databases?
    Go to Site Actions, Site Settings and click Workflows in the Galleries column. Most if not all in the "In Progress" column are in an idle state and are saved to the database.



    Mike Smith TechTrainingNotes.blogspot.com
    • Marked as answer by Mike Walsh FIN Wednesday, February 17, 2010 5:01 AM
    Tuesday, February 16, 2010 8:44 PM

All replies

  • SharePoint workflows are persisted to the content database when they are inactive. Your workflows, if written as SharePoint workflows will also be automatically persisted the the database. If your worklfows are hosted outside of SharePoint (Console app for example) then you need to manage your own persistence.

    > how would you check

    Outside of looking the content databases?
    Go to Site Actions, Site Settings and click Workflows in the Galleries column. Most if not all in the "In Progress" column are in an idle state and are saved to the database.



    Mike Smith TechTrainingNotes.blogspot.com
    • Marked as answer by Mike Walsh FIN Wednesday, February 17, 2010 5:01 AM
    Tuesday, February 16, 2010 8:44 PM
  • Thanks for the reply Mike.  As I keep delving further and further into workflows I keep running across more and more questions.

    If you wanted to create a State Machine workflow, are you forced to write this is only in Visual Studio 2008 and not Sharepoint Designer?

    If you do write it in Visual Studio 2008, how can your Sharepoint webparts access the various states in your workflow? 

    In Sharepoint Designer I see actions like 'Send Email', is this available if you write it in VS 2008?

    You mentioned hosting workflows outside of Sharepoint and personally managing its persistence, is it possible to force your workflow to be hosted inside SharePoint and thus allow SP to handle persistence?

    Again sorry for all the questions, just not having an easy time finding answers.

    J
    Tuesday, February 16, 2010 9:21 PM

  • > If you wanted to create a State Machine workflow, are you forced to write this is only in Visual Studio 2008 and not Sharepoint Designer?

    Correct


    > If you do write it in Visual Studio 2008, how can your Sharepoint webparts access the various states in your workflow?

    I guess that depends what your workflow is attached to. SharePoint workflows are attached to lists and libraries, so the web part code would need to look at fields in the list with the workflow, or, they both should share data somewhere else (external SQL table, a SharePoint property bag, etc)


    > In Sharepoint Designer I see actions like 'Send Email', is this available if you write it in VS 2008?

    Yes.  It's an activity in the Toolbox called "SendMail"   :-)


    > You mentioned hosting workflows outside of Sharepoint and personally managing its persistence, is it possible to force your workflow to be hosted inside SharePoint and thus allow SP to handle persistence?

    Yes, and that is the most common thing to do with SharePoint workflows that respond to changes in lists and libraries.


    > Again sorry for all the questions, just not having an easy time finding answers.

    No problem...

    Google, oops, I mean "Bing" "sharepoint visual studio workflow tutorial".



    Mike Smith TechTrainingNotes.blogspot.com
    Tuesday, February 16, 2010 10:08 PM
  • Please post new questions in new threads.

    Apart from anything else it's a shame that only one of Mike's answers should be marked as an answer, but the main thing is that you are misunderstanding the point of forums when you are implicitly directing your additional questions to Mike by posting them in the same thread rather than in a new thread with a new title. In forums anyone answers and there are no guarantees that the person who answered once in a thread will even see the follow-up question.


    (moderator)


    FAQ sites: (SP 2010) http://wssv4faq.mindsharp.com; (v3) http://wssv3faq.mindsharp.com and (WSS 2.0) http://wssv2faq.mindsharp.com
    Complete Book Lists (incl. foreign language) on each site.
    Wednesday, February 17, 2010 5:01 AM