Modify a running custom visual studio workflow activity on Sharepoint 2007 RRS feed

  • Question

  • Is there any way to make a modification to the logic of an activity without breaking the already running workflows?

    The activity was created on visual studio 2008 and it is deployed on Sharepoint 2007.
    Actually, I had already make some tests but with negative results. Always the running workflows are broken and I cannot start them again.

    Please let me know if you need further information.

    Thanks in advance.

    J. Marcos Villar

    Tuesday, December 27, 2011 8:25 PM


  • Yes you can add activity without making any Impact on the Inflight running (In progess) workflows.

    Once you added the activity to the workflow you need to change Version for the assembly.

    If you added the activity to workflow and without changing assembly version you are trying to deploy the assembly. This will deletes all running instances of the workflow (In flights workflow). The old version of the workflow will be removed, and the new version will be added with zero running instances. Don't upgrade without creating a new version unless you're entirely sure you don't need to retain the running instances.

     A new workflow version is essentially a new workflow. The basic technique is to make your assembly increment the version number with each build (rather than just leave it at forever). Then, for each upgrade you create a new feature for that "version" of the workflow, pointing to the new assembly. You add the new assembly into the GAC alongside the old assembly. Lastly you specify that the old version cannot start new instances of the workflow and you add the new workflow onto the list.  All you ever do is deploy another version of the assembly and add the new workflow to the list and disable previous versions. You don't want to remove the previous versions because that will orphan those running instances.

    For few more option goto http://msdn.microsoft.com/en-us/library/cc514224.aspx#MOSS2007DevWorkflowSolutions_SavingWorkflowState in the section (Saving Workflow State and Upgrading Workflow Assemblies)

    Hope this will answer your query.


    • Edited by ddpatil Wednesday, December 28, 2011 5:03 PM
    • Proposed as answer by ddpatil Thursday, December 29, 2011 6:04 AM
    • Unproposed as answer by Pengyu Zhao Friday, December 30, 2011 5:18 AM
    • Marked as answer by Pengyu Zhao Wednesday, January 4, 2012 2:34 AM
    Wednesday, December 28, 2011 4:52 PM