views:

53

answers:

1

Hello everyone,

If we put in production the version 1.0 of a workflow, and we change it to, let say, 1.1. What happens with the persisted instances? if you have experience in that issue, please tell me about best practices

Thanks in advance.

+1  A: 

You will most likely get some weird type conversion exception. WF4 has no support for upgrading an existing workflow instance to a newer version. A serious problem if you are not aware of it.

The suggested way of solving this with workflow services is to use multiple service hosts each hosting a unique version and put the service router, new in WCF 4, in front of it. Client send messages to the router and this decides based on the message which WorkflowServiceHost should handle the request.

If you are using the WorkflowApplication basically you need to do something similar. Keep track of the versions of instances and load the correct workflow definition when you want to reload a workflow instance.

Maurice
As I see, I keep all those services in the IIS and put a message router in front of it that redirect the message to the version requested in the message.Looks nice.
Pablo Castilla
Returning the workflow version from the initial call and making that a required parameter for each subsequent call can make the routing easier.
Maurice