The Problem SolverWIndows Workflow Foundation
HomeShow ChangesEditPrintRecent ChangesSubscriptionsLost and FoundFind ReferencesRename



17-11-2009 10:08:0317-11-2009 08:53:008-11-2009 19:42:1826-10-2009 09:56:0125-10-2009 15:43:49

List all versions

Sql Tracking Query

If you want to see the tracking data itself you might start running SQL queries against the database. An easier way is to use the SqlTrackingQuery.TryGetWorkflow() to load an SqlTrackingWorkflowInstance instance with the tracking data. The SqlTrackingWorkflowInstance object as properties to inspect the workflow status, the workflow events, the activity events and more.

SqlTrackingQuery provides methods and properties that you can use in order to access certain kinds of tracking data stored in a SQL database by the SqlTrackingService. Access to this data is provided through SqlTrackingWorkflowInstance objects. You can call TryGetWorkflow to try to get a SqlTrackingWorkflowInstance for a specific workflow instance. You can call GetWorkflows to get a collection of SqlTrackingWorkflowInstance objects that correspond workflow instances that have tracking data that matches a set of query parameters contained in a SqlTrackingQueryOptions that is passed as a parameter to the method. See the SqlTrackingWorkflowInstance class for more information about the kind of tracking data available and see the SqlTrackingQueryOptions class for more information about the kind of queries that can be performed.

Two SQL scripts Tracking_Schema.sql and Tracking_Logic.sql are included with the default install to configure the required SQL Server database.

See for a sample of how to use SqlTrackingQuery. This is a link to the updated sample code.

More information about the setup can be found at

Wiki Usage

This wiki site is supposed to be a shared resource. As a shared resource everyone is encouraged to add new content or modify existing content!

Enjoy the WF wiki.

Recent Topics