none
How to address the Versioning issues in Windows Workflows?

    Question

  • Hey,

    We are building the Windows Workflow solutions using Windows Workflows 4.0 ( no plans of moving to 4.5 version)

    We have deployed the latest code  (workflow solution - long running processes) in the production. but unfortunately we have some production issue, which requires the fix in the Business component ( changing the internal logic of the method).

    we have made the change and deployed it in our development environment. I have noticed that  persisted workflows broke out due to these business component changes.. But it was strange.

    I know that persisted workflows generally breaks out when the changes are happened to the Business Entities / Workflow definitions / Activity library changes.

    Question 1)Why the persisted workflow broke out for internal business logic changes?

    Question 2)  To address the above issue , I have maintained both the versions (New & Old) in the GAC instead in the Application Base. My persisted workflows worked great, but the newly started workflows also used the older version too. How to address this?

    Question 3) Is WCF Routing Service is only the solution to address these changes  ( internal business logic changes, Business Entities, Workflow definitions, Activity Library changes)?

    We are in deep trouble.. Please help me..

    Regards

    Deepa


    Deepa

    Thursday, October 18, 2012 2:34 PM

Answers

  • You may consider increase the library version of all of your dll. For example you have workflow.dll version 1.0.0.0 and workflow.business.component.dll version 1.0.0.0 in GAC. For any changes to workflow (including dll consume by workflow) increase all dll version to be greater than 1.0.0.0. (Example version 1.0.0.1). You may want to keep the old dll in the GAC for old instance to continue to work and new instance to run on the new changes.

    Try to have all dll increased to the same version number. This will increased maintainability and avoid confusion. 



    • Edited by d3ric3 Friday, October 19, 2012 9:30 AM
    • Marked as answer by LeoTangModerator Friday, October 26, 2012 1:49 AM
    Friday, October 19, 2012 9:26 AM

All replies

  • Hi,

    Hope these helps:

    Versioning Workflows

    http://msdn.microsoft.com/en-us/magazine/dd727506.aspx

    Versioning of workflows in WWF 4.0

    http://social.msdn.microsoft.com/Forums/en-US/wfprerelease/thread/25538e1f-9a53-4557-980a-c0f9692f2c4a

    How has workflow / activity versioning improved/changed when using serialization and persistence in WF 4.0 compared to WF3?

    http://social.msdn.microsoft.com/Forums/en/wfprerelease/thread/7cb152d0-419f-4cb0-bed2-cb8a69c8bb52

    Friday, October 19, 2012 5:17 AM
  • You may consider increase the library version of all of your dll. For example you have workflow.dll version 1.0.0.0 and workflow.business.component.dll version 1.0.0.0 in GAC. For any changes to workflow (including dll consume by workflow) increase all dll version to be greater than 1.0.0.0. (Example version 1.0.0.1). You may want to keep the old dll in the GAC for old instance to continue to work and new instance to run on the new changes.

    Try to have all dll increased to the same version number. This will increased maintainability and avoid confusion. 



    • Edited by d3ric3 Friday, October 19, 2012 9:30 AM
    • Marked as answer by LeoTangModerator Friday, October 26, 2012 1:49 AM
    Friday, October 19, 2012 9:26 AM
  • Thanks for your responses.. Sorry for the delay too..

    Hi D3ric3,

    Whatever you mentioned above, I have done it in the similar way ( by increasing the version of all the dlls (Here in my scenario BusinessLibrary and ActivityLibrary) and manintaining two versions of dlls (old & new ) in the GAC..   My persisted workflows didn't break since old version were existed in the GAC.

    By my problem is my new instances were also running with the older versions since I didnt publish (Windows workflow service .xamlx). If I publish my persisted workflow breaks.. Is there any solution other than buidling WCF routing service..

    Anyways we have planned to migrate to windows workflows 4.5 ( VSTS 2012)...  As WorkflowServiceHost is a multi version host but I was wondering how could I make the changes to the host to support the mutiple versions (host.SupportedVersions.Add(serviceV1)); as I have deployed my services in IIS. 

    Any suggestions would be appreciated..

    Thanks & Regards

    Deepa


    Deepa


    • Edited by Kaldeepbob Monday, October 29, 2012 2:39 PM
    Monday, October 29, 2012 2:35 PM
  • Hi Deepa,

    In order to support multiple versions of your workflow service in IIS, you could use XCOPY deployment. Please see the following sample for more details:

    Thank you,

    Hani

    Friday, January 04, 2013 5:29 PM