Is there any way of applying the same TrackingProfile to all workflow instances that inherit from a common base class workflow e.g.
BaseWorkflow ---> has its own tracking profile
DerivedWorkflow1 : BaseWorkflow
DerivedWorkflow2 : BaseWorkflow
etc.
My experiments suggest that when using the SQL Tracking service a separate (in my case identical) profile must be defined for each and every DerivedWorkflow type: a BaseWorkflow profile is not applicable to the derived workflows.
This is a bit of a maintenance headache when large numbers of derived workflows exist.

Applying TrackingProfiles to a base class workflow and all sub-classes
KevinKerr
DanBog
You could do this in a custom tracking service (which is handed the type and asked for the profile), but the SQL tracking service looks in the database for an entry that matches the actual type of the workflow and does not consider base types.
Matt
axl
You can specify a profile for a specific type and still keep the original default profile if you want. Basically the logic goes... Look for a profile for the specific type of workflow that is starting. If found use it. If not is the UseDefaultProfile flag enabled (true by default) If yes associated the default profile to the workflow type and use it. If not return no profile and no tracking will occur.
To insert or update a profile for a specific workflow type in the SqlTrackingService database use the UpdateTrackingProfile stored proc. To update the default profile use the UpdateDefaultTrackingProfile stored proc.
Thanks,
Joel West
MSFTE - SDE in WF runtime and hosting
This posting is provided "AS IS" with no warranties, and confers no rights
Perry Choy
Jon's idea of replacing the default profile seems to be the best approach here. I think inheritable tracking profiles would be a nice feature for a future version of WF however.
Eric Robert
simonii
kageg
I think Joel was clarifying that you can insert your shared profile as the default profile, which gives you what you want (all of your derived types will use that default profle).
But, in the case where you want to use a different profile, either for one of these derived types or some other type, if you insert the type specific profile, it will get used.
Basically, use the default profile for your shared, but you are not stuck if you need to use a different profile for a specific type later on.
Matt