We have a lot of long running workflows which are persisted to the database and require a logic change in the condition of a loop, we tried chaning the condition on the loop from a normal variable check to a function call as the calculation is now lot m开发者_JS百科ore complicated. This breaks the existing workflows which are persisted before this change. when we try to load the previously persisted workflow with the new workflow definition, the loading fails with the exception
System.Activities.ValidationException occurred
Message='LocationReferenceValue<String>' is not of type 'WaitForInput`1'. When loading this instance you must ensure that the activity with name 'LocationReferenceValue<String>' implements 'WaitForInput`1'.
Source=System.Activities
StackTrace:
at System.Activities.ActivityInstance.System.Activities.Runtime.ActivityInstanceMap.IActivityReference.Load(Activity activity, ActivityInstanceMap instanceMap)
InnerException:
Is there any way to change the condition on a while loop activity in a XAML based activity in WF4 without breaking any of the previously persisited instances?
Unfortunately not with WF4. We have a new feature in WF 4.5 called Dynamic Update that will address this scenario.
精彩评论