Tracking User Events

SqlTrackingService, because it is a part of WF, is capable of tracking events that are inherently a part of WF. That is, it can track standard events fired from activities and workflow instances. But what about events your workflow generates? How do we track those?

As it happens, the Activity activity supports a method named TrackData. TrackData has two overloaded versions: one that takes an object to be stored in the tracking database and one that accepts a string as a key as well as the object to be stored.

If you execute TrackData and pass in data for tracking purposes, usually a string, the information will be stored in the tracking database as user-event data. Try the procedure below with the WorkflowTracker project we ...

Get Microsoft® Windows® Workflow Foundation Step by Step now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.