I have a custom tracking service that has been running for a while, now that more than 1,500 live workflows are ticking, I am now working on a version of the workflows so that I can release some change requests.
Unfortunately, the system was not initially deployed using strongly typed assemblies, so I am sorting this mess.
I need to use a custom SerializationBinder mix to translate PublicKeyToken = null into my new PublicKeyToken and AppDomain_AssemblyResolve delegate to help point the node to now strongly typed assemblies - Link here .
I also had to replace the contents of the related rows in the [Type] table that comes with the default SqlTrackingService in order to reference the new PublicKeyToken, so:
some.namespace.foobar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
replaced by:
some.namespace.foobar, Version=1.0.0.0, Culture=neutral, PublicKeyToken=123456789acb
I seemed to get good results, however, when I go to the State Machine workflow, the Custom Tracking service that I added as a service no longer starts for workflows version 1.0.0.0, but works for the newly created version 2.0.0.0 work processes.
Note. The standard SqlTrackingService still works fine in both versions of the workflow, it's just a problem with the custom tracking service on existing persistent workflows.
A custom tracking service is always added via app.config as follows:
<Services> ...other services here... <add type="some.namespace.ActiveStateTrackingService, some.namespace.extensions" assembly="uk.gov.gsi.cma.extensions" /> </Services>
Any ideas on what else I need to change to get this to work for existing workflows?
As requested, this is a custom tracking service, although the problem is that the host โbindsโ the custom tracking service, not the tracking service - I know this because in the case where the custom tracking service isnโt, none of methods, including the constructor, are not called.
public class ActiveStateTrackingService : TrackingService { protected override TrackingProfile GetProfile(Guid workflowInstanceId) { return GetDefaultProfile(); } protected override TrackingProfile GetProfile(Type workflowType, Version profileVersionId) { return GetDefaultProfile(); } protected override TrackingChannel GetTrackingChannel(TrackingParameters parameters) { return new ActiveStateTrackingChannel(parameters); } protected override bool TryGetProfile(Type workflowType, out TrackingProfile profile) { profile = GetDefaultProfile(); return true; } protected override bool TryReloadProfile(Type workflowType, Guid workflowInstanceId, out TrackingProfile profile) { profile = null; return false; } private TrackingProfile GetDefaultProfile() { TrackingProfile profile = new TrackingProfile(); profile.Version = new Version(1, 0);