.NET Framework Developer Center > .NET Development Forums > Windows Workflow Foundation > How do you upgrade a workflow with dynamic update?
Ask a questionAsk a question
 

AnswerHow do you upgrade a workflow with dynamic update?

  • Thursday, March 06, 2008 10:38 PMaboreham Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I'd like to explorer the option of "upgrading" old instances to the new version further.

     

    I've looked at the samples of Dynamic Update but I still can't quite understand how that can help me.

     

    Let's say I'm about to release a new version of the Workflow and let's say that all the currently running instances MUST be upgraded to use the new version.

     

    How would I actually go about this?

     

Answers

  • Friday, March 07, 2008 3:52 AMSung Hon Wu - MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

       Important questions to ask,

     

    1)  did you version workflows so you can tell which version each workflow is?

    2)  are you using persistance?  Do you have access to currently running versions.

     

    Generally, to upgrade your running instances here what is you would do.

    1)  Create an app to load your instances from a persistance store

    2)  Apply the changes to update your workflows using the api's available (workflowchanges)

    3)  Save the instances back to the persistance store

     

    Voila, the next time the workflow is loaded to execute, it will be upgraded.

     

    Note that we restrict you to modifying workflows that are in the currently idled / created / suspended states.  So this assumes your currently running workflows that do go into the idle state or that you put them into the suspended state.

     

    Here is a good blog on how to play with the feature.

    http://blogs.msdn.com/markhsch/archive/2005/09/23/473373.aspx

     

    Thanks

    Sung Hon

All Replies

  • Friday, March 07, 2008 3:52 AMSung Hon Wu - MSFTMSFTUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

       Important questions to ask,

     

    1)  did you version workflows so you can tell which version each workflow is?

    2)  are you using persistance?  Do you have access to currently running versions.

     

    Generally, to upgrade your running instances here what is you would do.

    1)  Create an app to load your instances from a persistance store

    2)  Apply the changes to update your workflows using the api's available (workflowchanges)

    3)  Save the instances back to the persistance store

     

    Voila, the next time the workflow is loaded to execute, it will be upgraded.

     

    Note that we restrict you to modifying workflows that are in the currently idled / created / suspended states.  So this assumes your currently running workflows that do go into the idle state or that you put them into the suspended state.

     

    Here is a good blog on how to play with the feature.

    http://blogs.msdn.com/markhsch/archive/2005/09/23/473373.aspx

     

    Thanks

    Sung Hon