Share via


Using the Tracking Profile Object Model SampleĀ 

Download sample

This sample illustrates how to create, serialize, and deserialize tracking profiles by using the Tracking Profile object model.

Windows Workflow Foundation provides a Tracking Profile object model that you can use to create tracking profiles, serialize them to XML form, and then deserialize the XML tracking profiles back to a tracking profile object.

Tracking Profiles are a collection of WorkflowTrackPoints, ActivityTrackPoints, and UserTrackPoints. The track points determine a specific location in your workflow that you want to receive runtime information about. WorkflowTrackPoints are used to determine what workflow events you want to extract. ActivityTrackPoints are used to determine what ExecutionStatus events you want to extract, as well as other activity properties. UserTrackPoints are used to determine what user events you want to extract.

Tracking profiles enable you to specify locations to match and to also get or exclude related events and extracted data. Locations can be determined by the type, or qualified name, of specific activities.

Specifically, this sample does the following:

  • Creates a profile with WorkflowDataTrackingExtract and annotates various track points. The WorkflowDataTrackingExtract class extracts activity properties, such as the name of an activity, or a field that is defined in a workflow.

  • Creates a profile to match all workflow events by using the TrackingWorkflowEvent enumerated data type.

  • Creates a profile by using the UserTrackPoints property.

  • Serializes a TrackingProfile to XML, and deserializes the XML representation of the TrackingProfile back to an object by using the TrackingProfileSerializer class.

To build the sample

  1. Download the sample by clicking Download Sample.

    This extracts the sample project to your local hard disk.

  2. Click Start, point to Programs, point to Microsoft Windows SDK, and then click CMD Shell.

  3. Go to the source directory of the sample.

  4. At the command prompt, type MSBUILD <Solution file name>.

To run the sample

  • In the SDK Command Prompt window, run the .exe file in the TrackingProfiileObjectModel\bin\debug folder (or the TrackingProfileObjectModel \bin folder for the VB version of the sample), which is located below the main folder for the sample.

See Also

Reference

ActivityTrackingRecord
WorkflowTrackingRecord
UserTrackingRecord
TrackingParameters
TrackingRecord
TrackingChannel
RuleActionTrackingEvent
TrackingService
TrackingProfile

Other Resources

Tracking Samples
Simple Tracking Sample
Query Using SQLTrackingService Sample
Tracking Using User Track Points Sample
EventArgs Tracking Sample
ConsoleTrackingService Sample
Query Using SQLTrackingService Sample
RuleActionTrackingEvent Sample
File Tracking Service and Query Sample
SQL Data Maintenance Sample
Windows Workflow Tracking Services

Footer image

Send comments about this topic to Microsoft.