Moving workflow to a different engine instance RRS feed

  • Question

  • Hi all,
    I would like to have your help to validate the following scenario.
    The aim is to move a running workflow to a different server (WF4). I know that AppFabric/Dublin will be able to do it, but need to do it independently:
    • Persist the running workflow in server A, including all variables as database records.
    • Send the persisted information along with the XAML to server B
    • If workflow is related to some custom activities, send the DLLs related to activities to server B
    • Compile XAML into server B
    • If compilation is succesful in server B, delete it from server A (handshaking communication needed)
    • (all following operations in server B)
    • Construct the workflow object using reflection or Activator
    • Save persistance records from server A in database of server B, and replace UID with the one generated in previous sted
    • Un-persist the workflow state and variables
    • Give an “electric shock” to the engine to continue from some specific point. A bookmark can be used to re-start in the proper activity.

    Please tell me if the overall goal can be reached, and if some refinements are needed.

    Thanks in advance,

    • Moved by Andrew_Zhu Wednesday, February 3, 2010 3:17 AM (From:Windows Workflow Foundation)
    Friday, January 29, 2010 6:45 PM


  • If I understand what you are attempting to do, yes, it should work fine.  The only couple things I can think of are:

    *  You will need to preserve the instance ID, since it is duplicated within the state blob itself.
    *  You will need to copy over all of the keys as well - they are considered part of the instance state.
    *  You will need to make sure that the ServiceName matches between server A and server B, otherwise the keys will not be calculated correctly, and the instance will not be allowed to load (the ServiceName is validated on load).

    Let me know if you run into any other problems!

    Thanks -
    Wednesday, February 3, 2010 6:09 PM