index > Windows Workflow Foundation > Error: Changing a workflow and getting a state on a persisted Wor...

Error: Changing a workflow and getting a state on a persisted Wor...

I was experimenting with Persistance and created some workflow instances and unloaded them. these appeared in my database with appropriate Guid's. I then closed the application and reopened it and returned the State of the workflow fine using:
Jeremy Thake

If you change the definition of a workflow and recompile it you need to change the assembly version. The existing instances (unloaded or in memory) need the original version of the type/assembly in order to be deserialized correctly. If you need to change the definition of an "in-flight" running instance you'll need to use the dynamic update functionality.

Thanks,
Joel West
MSFTE - SDE in WF runtime and hosting

This posting is provided "AS IS" with no warranties, and confers no rights

Joel West
That seems to imply more than just having to change the assembly version - the implication seems to be that we need to keep the old version of the workflow type around for as long as there are persisted instances of that workflow.

Does this mean that we'll end up with an application that references multiple different versions of our workflow type, each contained in it's own assembly?
piers7

Yes, you need to keep the original version that started the instance available. Binary serialization relies on being able to load the correct version of the assembly. If you change the workflow structure without versioning the assembly or you delete or remove the assembly deserialization will fail.

Thanks,
Joel West
MSFTE - SDE in WF runtime and hosting

This posting is provided "AS IS" with no warranties, and confers no rights

Joel West
reply 4

You can use google to search for other answers

 

More Articles

• Updating Workflow
• How to load conditions from a .rules file in a designer hosting a...
• WWF Hosting under ASP.NET
• Dependency Properties
• Tracking Changes in 2.2
• Activity Properties
• Conceptual problem
• How to get WorkflowInstance from Workflow Runtime
• Cannot access a disposed object.Object name: 'WorkflowRuntime'. -...
• NameValueCollection in custom activity
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Error: Path needs to point to valid member
• workflow and web applications
• Amazing framework....do you have any hig
• Append Workflow to an existing solution
• State machine usage
• Business entity objects as properties in
• LoadDesignerLayout problem
• Hybrid Workflow?
• CallExternalMethodActivity passing wrong
• knowing wich activity idled the workflow.
• If/Else - Code Condition using an Activi
• Deserialized Activity property value is
• Can DataExchange service hold variables?
• Issues in installing Windows workflow fo
• WebServiceInput Activity Error: Paramete

Hot Articles

• Change the flow at runtime
• Workflow Parameters and Activity Propert
• ftp in activity
• StateMachine WorkWlow
• Load WorkflowInstance from Persistence D
• Understanding the Windows Workflow Found
• Persistence without serialization
• adding the workflow runtime & servic
• Spanning a Transaction Across Workflows
• Default values of dependency properties
• Error Afetr installing Visual Studio 200
• Dynamic Choice List for a Custom Activit
• Some basic questions on wwf
• Workflow persistence functionality
• HELP: Exception has been thrown by the t

Recommend Articles

• State machine usage
• How to Expose webService for a state mac
• What if an activity is not the atomic un
• Execute Activity Method Dynamically
• There is Event When Server is failed (WCF)
• How2UseSqlserverPersistenceService
• Calling External method on Exception
• Custom Tracking service in app.config, W
• WWF , BPEL , BP workflows
• Feedback/Suggestions Db Schema for Provi
• Windows Worflow Designer
• Implement the Workflow in web application
• Problem with SqlWorkflowPersistenceServi
• Lost collections in Visual Studio 2005[e
• Performance problem