versioning in workflow 4.0 services when they are persisted
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.
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.
精彩评论