SqlTrackingService Class
Represents a tracking service that uses a SQL database to store tracking information.
System.Workflow.Runtime.Hosting::WorkflowRuntimeService
System.Workflow.Runtime.Tracking::TrackingService
System.Workflow.Runtime.Tracking::SqlTrackingService
Assembly: System.Workflow.Runtime (in System.Workflow.Runtime.dll)
The SqlTrackingService type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | SqlTrackingService(NameValueCollection) | Initializes a new instance of the SqlTrackingService class by using the specified NameValueCollection. |
![]() | SqlTrackingService(String) | Initializes a new instance of the SqlTrackingService class by using the specified database connection string. |
| Name | Description | |
|---|---|---|
![]() | ConnectionString | Gets the connection string for the tracking database. |
![]() | EnableRetries | Gets and sets a value specifying whether the SqlTrackingService will retry when performing a database operation. |
![]() | IsTransactional | Gets or sets a value that indicates whether SqlTrackingService participates in workflow transactions. |
![]() | PartitionOnCompletion | Gets or sets a value that specifies whether tracking data for a workflow instance should be moved to the currently active partition in the database when the workflow instance is completed. |
![]() | ProfileChangeCheckInterval | Gets or sets a value that specifies the interval at which the database should be checked for changes to one or more of its tracking profiles. |
![]() | Runtime | Gets the WorkflowRuntime for this service. (Inherited from WorkflowRuntimeService.) |
![]() | State | Gets the state of the WorkflowRuntimeService. (Inherited from WorkflowRuntimeService.) |
![]() | UseDefaultProfile | Gets or sets a value specifying whether a default TrackingProfile should be used for workflow types that do not have a tracking profile. |
| Name | Description | |
|---|---|---|
![]() | 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. (Inherited from TrackingService.) |
![]() | 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. (Inherited from TrackingService.) |
![]() | 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. (Inherited from TrackingService.) |
![]() | 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. (Inherited from TrackingService.) |
![]() | 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. (Inherited from TrackingService.) |
| Name | Description | |
|---|---|---|
![]() | ProfileRemoved | Occurs when the SqlTrackingService detects that a TrackingProfile has been deleted. |
![]() | ProfileUpdated | Occurs when the SqlTrackingService detects that a TrackingProfile has been changed. |
The SqlTrackingService class represents a fully functional tracking service. You can use this service out-of-box to collect and store tracking information, and to store tracking profiles and provide them when requested by the workflow runtime engine. The SQL tracking service writes tracking data sent to it by the runtime tracking infrastructure to a SQL database.
In many scenarios it is important for the SqlTrackingService to maintain consistency between its database and the state of the workflow runtime engine. Therefore, the SqlTrackingChannel class makes use of the IPendingWork interface to participate in the workflow transaction batching functionality provided by the WorkflowCommitWorkBatchService. You can set IsTransactional or pass the appropriate parameters to the constructor to configure the SqlTrackingService to participate in batching and add objects that represent pending changes to the SQL database to the WorkBatch.
The SqlTrackingService also maintains tracking profiles in its database. The workflow runtime engine must be kept apprised of changes to any of the tracking profiles that it is using. The SqlTrackingService implements the IProfileNotification interface and periodically examines the tracking profiles in its database in order to notify the workflow runtime engine of changes to a TrackingProfile stored in its database. You can set ProfileChangeCheckInterval or pass the appropriate parameter to the constructor in order to set the interval at which the SqlTrackingService examines its tracking profiles to notify the tracking runtime of any profile changes.
Note |
|---|
When using both the SqlTrackingService and the SqlWorkflowPersistenceService in a workflow application, it is recommended that you use a single database for both persistence and tracking. |
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.
