Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Our business processes changed, and now we want to add some pretty important functionality to a series of long-running workflows written using Visual Studio. This involves adding several fields to the workflow class -- there is no way around it that we can think of. We need the functionality in the currently running workflows if we don't want to lose weeks of work.

My question is, if we mark those fields as [OptionalField], will this break the persistence mechanism on deserialization, or will Sharepoint deserialize the workflow object as usual and set those new fields to null?

share|improve this question
    
I hope you have a DEV environment you could try this in? –  Kit Menke Dec 15 '11 at 16:51
    
Yeah, I think I'll do just that. I hoped someone on SO already knew the answer and would save me half an hour. ;) Mods, you can delete this question. –  Mihai Dec 15 '11 at 17:41
3  
Oh I think this is a great question and I don't think we should delete it. If someone (or you) find out the answer, please post it. I was just recommending trying this in DEV as well because losing weeks of work sounds like a very bad scenario. –  Kit Menke Dec 15 '11 at 17:44
add comment

1 Answer 1

up vote 2 down vote accepted
+50

It looks more or less like a case of Workflow Versioning (old workflow remains same whereas new ones work as per new rules). I think this thread should give you pointers to keep things in mind when doing such an activity - http://stackoverflow.com/questions/7651842/how-to-update-a-sharepoint-2010-workflow/8307069#8307069

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.