Operation is not implemented by the Service - WorkflowServiceHost versioning
I’ve written quite a bit of code to get this to work but still end up with the ‘Operation is not implemented by the service’. (I've already read through this link but am having trouble converting that idea to a console based host using WorkflowServiceHost http://social.msdn.microsoft.com/Forums/en-US/windowsworkflowfoundation/thread/e4facc23-9ef6-46a7-90d1-a93424512926/)
Here is what I have done:
1. In my workflow assembly, I now have two workflows (types), VersionWF and VersionWF_V2.
2. I set my assembly to version 1.0.0.0.
3. In my WCF contract, I have two contract versions IVersionWF (used by Receive activities in VersionWF) and IVersionWF_V2 (used by Receive activities in VersionWF_V2).
4. Deploy the workflow assembly to the GAC.
5. I have modified my console app based hosts app.config file to have two different services, one for each contract.
6. In my workflow console base host program.cs, I create two WorkflowServiceHost instances using the new workflow types. One thing to note here, in order to add the persistence service to the workflow runtime, I do this:
WorkflowRuntime wfRuntime = workflowHost.Description.Behaviors.Find<WorkflowRuntimeBehavior>().WorkflowRuntime;wfRuntime.AddService(new SqlWorkflowPersistenceService(connectionString, true, new TimeSpan(0, 0, 30), new TimeSpan(0, 5, 0)));
One question I have here is that if I create two instances of WorkflowServiceHost in my program.cs, is it creating two different runtimes? I’d rather not do this but suppose that may require further custom coding or deriving a class from the WorkflowServiceHost.
7. I open both instances of the WorkflowServiceHost.
In the client:
1. I now have two service references and basically have to code the client in such a way that if they want to create a version 2 workflow, they put in a different endpoint address and the code will use the appropriate service reference and factory/channel to build the proxy.
Test:
1. I create 2 workflows and have them unload into persistence. This is while the workflow assembly is set to version 1.
2. I go back to the workflow assembly and change it’s version to 2.0.0.0 and redeploy to the GAC. I can now see I have two versions in the GAC.
3. I go and create 2 more workflows.
4. I now go and try to restart one of the two workflows I just created. Works fine.
5. I go and create two new workflows, using the VersionWF type (which originally would have been version 1 of the component) and I can create a workflow and restart it ok.
6. I go and try to restart one of the two workflows I created with version 1 of the component, I get the exception.
So still, if a workflow has been created with V1 of the component and I try to restart it, the exception happens. This still has something to do with trying to reload a workflow that was created with a different version of the assembly.
Any idea what could be causing this thing to think that operation from the old assembly is not implemented?
Answers
- does this help: http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx
- Marked As Answer bystombiztalker Sunday, October 25, 2009 5:48 PM
All Replies
- does this help: http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx
- Marked As Answer bystombiztalker Sunday, October 25, 2009 5:48 PM
- It is similar to another more complete answer I found but still this is good information that my search did not pickup, so Thanks!
Here is the other blog:
http://blogs.msdn.com/ncdevguy/archive/2009/10/06/versioning-workflow-services.aspx
Thanks again!


