Loading persisted workflow after workflowdefinition has changed in WF4

后端 未结 5 658
余生分开走
余生分开走 2021-01-05 01:12

How to solve this problem (in WF4):

I create a workflow in xaml and start several instances of it, I have a persistancestore and all workflows persist on a bookmark

5条回答
  •  灰色年华
    2021-01-05 01:45

    It is possible to load persisted wf instance after changing the definition in WF4 - you have to parse and change the xml files that the wf engine stores. You should create two equal workflows : with the old version and the new version and to compare them in order to remove the differences. This must be done for the definition xml and the complex data xml that is used to store the workflow state. Parsing it with LinqToXML will save you lots of time and you have to be sure that you have checked all the differences - if there is one difference left, the wf will not be able to Load. There is one element "ResumeData", which you could find in the wf state xml, which is too heavy to parse, but the good news is that you can simply remove it.

提交回复
热议问题