TrackingService.GetTrackingChannel(TrackingParameters) Method

Definition

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.

protected internal abstract System.Workflow.Runtime.Tracking.TrackingChannel GetTrackingChannel(System.Workflow.Runtime.Tracking.TrackingParameters parameters);

Parameters

parameters
TrackingParameters

The TrackingParameters associated with the workflow instance.

Returns

The TrackingChannel that is used to send tracking records to the tracking service.

Examples

The following example shows an implementation of the GetTrackingChannel method. This example is from the Termination Tracking Service SDK sample. For more information, see Termination Tracking Service Sample.

/// <summary>
/// Returns a tracking channel that will receive instnce terminated events.
/// </summary>
protected override TrackingChannel GetTrackingChannel(TrackingParameters parameters)
{
    return new TerminationTrackingChannel(parameters, source);
}

Remarks

The run-time tracking infrastructure uses one TrackingChannel for each tracking service for each workflow instance. The workflow run-time engine calls GetTrackingChannel on each tracking service to get the TrackingChannel for that service. You can use the information passed in TrackingParameters to associate tracking data sent on the TrackingChannel for your tracking service with a particular root workflow instance.

Applies to

Produkt Verze
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1