The abstract base class that provides the basic interface between a tracking service and the run-time tracking infrastructure.
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
Thetype exposes the following members.
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetProfile(Guid)||Must be overridden in the derived class, and when implemented, returns the tracking profile for the specified workflow instance.|
|GetProfile(Type, Version)||Must be overridden in the derived class, and when implemented, returns the tracking profile, qualified by version, for the specified workflow Type.|
|GetTrackingChannel||Must be overridden in the derived class, and when implemented, returns the channel that the run-time tracking infrastructure uses to send tracking records to the tracking service.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|OnStarted||When overridden in a derived class, represents the method that will be called when the workflow runtime engine raises the WorkflowRuntime.Started event. (Inherited from WorkflowRuntimeService.)|
|OnStopped||When overridden in a derived class, represents the method that will be called when the workflow runtime engine raises the WorkflowRuntime.Stopped event. (Inherited from WorkflowRuntimeService.)|
|RaiseServicesExceptionNotHandledEvent||Raises the WorkflowRuntime.ServicesExceptionNotHandled event. (Inherited from WorkflowRuntimeService.)|
|Start||When overridden in a derived class, starts the service and changes the State to Starting. (Inherited from WorkflowRuntimeService.)|
|Stop||When overridden in a derived class, stops the service and changes the State to Stopping. (Inherited from WorkflowRuntimeService.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|TryGetProfile||Must be overridden in the derived class, and when implemented, retrieves the tracking profile for the specified workflow type if one is available.|
|TryReloadProfile||Must be overridden in the derived class, and when implemented, retrieves a new tracking profile for the specified workflow instance if the tracking profile has changed since it was last loaded.|
A tracking service is responsible for supplying tracking channels and tracking profiles to the workflow run-time engine. The workflow run-time engine requests one TrackingChannel from a tracking service for each workflow instance for which it has a TrackingProfile. The workflow run-time engine uses this TrackingChannel to send tracking records associated with that workflow instance. A TrackingProfile contains track points that specify a set of tracking events for which the run-time tracking infrastructure should send tracking records. A TrackingProfile may also specify data to be extracted from the workflow instance when one of these tracking events occurs.
The run-time tracking infrastructure uses a TrackingProfile to filter tracking events emitted by a workflow instance. When a tracking event is emitted that matches a track point in the TrackingProfile, the run-time tracking infrastructure extracts any data specified in the TrackingProfile from the workflow instance and encapsulates this data and information about the tracking event in a tracking record. This tracking record is then sent over the TrackingChannel associated with the workflow instance. A tracking record may be one of the following kinds:
The host application can use the tracking record in any way that it chooses. For example, the host application may store the tracking information in a database and use it to implement a sophisticated user interface, or it may use the information to inform an administrator of a condition that requires some action. You can register a tracking service with the workflow run-time engine by calling WorkflowRuntime.AddService or by including the appropriate entry in the application configuration file.
All tracking services must inherit from the abstract class. This class defines the basic interface between a tracking service and the run-time tracking infrastructure. The workflow run-time engine requests a TrackingProfile for a specific workflow instance or workflow Type by calling one of the overloaded GetProfile methods or the TryGetProfile method. The workflow run-time engine calls GetTrackingChannel to request a TrackingChannel.
The workflow tracking runtime calls the GetProfile and TryGetProfile methods whenever a workflow instance is created or loaded from the persistence store. The overhead associated with these calls can be costly to the tracking service (many database calls, for example). You can implement the IProfileNotification interface in your tracking service to circumvent this call-based mechanism and use events to notify the workflow runtime engine of changes to a TrackingProfile. For tracking services that implement the IProfileNotification interface, the workflow run-time engine subscribes to the ProfileUpdated and ProfileRemoved events. Your tracking service can raise the appropriate event when a change to one of its tracking profiles occurs. The SqlTrackingService class implements this interface.
The workflow run-time engine calls the TryReloadProfile method to test whether a TrackingProfile has been updated or removed as a result of an explicit call by a host or a service to ReloadTrackingProfiles on a workflow instance. This process enables a host or service to dynamically change the tracking profile that is being used for a specific workflow instance.Notes to Inheritors
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.