Skip Ribbon Commands
Skip to main content
Tracking and Logging
Windows Workflow Foundation provides a tracking infrastructure to track execution of a workflow instance and log the results to files, databases, etc. The tracking runtime implements a workflow instance to emit events related to the workflow lifecycle, events from workflow activities and custom tracking events. 
TrackingRecord objects are sent to TrackingParticipants -- The workflow publishes TrackingRecords to which the TrackingParticipants subscribe.    TrackingParticipants are registered as extensions to the workflow.

Workflow Tracking Infrastructure

Different types of TrackingRecords:


The only built-in TrackingParticipant is

  • EtwTrackingParticipant - A consumer of workflow tracking data that emits an
    Event Tracing for Windows (ETW) event to an ETW session that contains the data from the tracking record.  

    "ETW is an efficient kernel-level tracing facility that lets you log kernel or application-defined events to a log file. You can consume the events in real time or from a log file and use them to debug an application or to determine where performance issues are occurring in the application. ... ETW lets you enable or disable event tracing dynamically thus making it possible to perform detailed tracing in a production environment without requiring computer or application restarts."

    ==> The standard Windows Event Viewer can thus be used to view the log files.

    ETW Tracking Sample from MSDN


TrackingParticipants are configured using TrackingProfile objects, which determine whether composite children activites are tracked, what information is recorded, etc.


A TrackingParticipant is installed by adding it as an extension to the workflow application:

WorkflowApplication wfApp = new WorkflowApplication(myActivity);
wfApp.Extensions.Add(new MyTrackingParticipant());


It should be noted that Windows Server AppFabric has another separate WWF monitoring service that can be used.