We have a long running workflow implemented using WF4 workflow services. We presently have a problem that when a new version of the workflow is deployed, existing persisted instances don't get loaded up. I saw on How do you manage versions in Workflow Foundation? (which then led to http://msmvps.com/blogs/theproblemsolver/archive/2008/09/10/versioning-long-running-workfows.aspx?ocid=aff-n-we-loc--DEV40909&WT.mc_id=aff-n-we-loc--DEV40909) on managing different versions using the codebase href hint in the app.config.
This works for a simple workflow that doesn't have any custom code activities - I deployed the XAMLX in an IIS 7 application, created a sub-directory (bin/v1) and put the DLLs there, and specified the probe path as below:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="v1" />
<probing privatePath="bin/v1" /> <!-- one of these is probably redundant... -->
</assemblyBinding>
</runtime>
However, when I add a custom code activity, the XAMLX appears to have a reference to the assembly like the following (I have excluded the standard assemblies from this):
<WorkflowService mc:Ignorable="sap sads" ConfigurationName="Service1"
sap:VirtualizedContainerService.HintSize="307,436" Name="Service1"
mva:VisualBasic.Settings="Assembly references and imported namespaces serialized as XML namespaces"
xmlns="http://schemas.microsoft.com/netfx/2009/xaml/servicemodel"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...
xmlns:p1="http://schemas.microsoft.com/netfx/2009/xaml/activities"
**xmlns:p2="clr-namespace:PromotionWorkflowV1;assembly=PromotionWorkflowV1"**
xmlns:s="clr-namespace:System;assembly=mscorlib"
...
>
When I try and navigate to the WF service in a browser, I get a parser error like:
Cannot create unknown type '{clr-namespace:PromotionWorkflowV1;assembly=PromotionWorkflowV1}SubmitActivity'.' Line number '42' and line position '6'.
I am presuming that this is because WF doesn't look at the probing path while it is parsing the XAMLX? Is there something else that can be done so I can achieve versioning in this scenario?
Thanks, -Srinivas