SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
up vote 2 down vote accepted

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 -

share|improve this answer

Your Answer


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.