Tracking Profile Designer Sample
The Workflow Tracking Profile designer is a tool to support the creation of tracking profiles from workflow definitions by using the workflow designer surface. This sample application assumes that you are familiar with tracking profiles and services. For more information, see the references at the end of this topic.
To build the sample
Download the sample by clicking Download Sample in this topic.
This extracts the sample project to your local hard disk.
Click Start, point to Programs, point to Microsoft Windows SDK, and then click CMD Shell.
Go to the source directory of the sample.
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 TrackingProfileDesigner\bin\debug folder (or the TrackingProfileDesigner\bin folder for the VB version of the sample), which is located below the main folder for the sample.
Creating Tracking Profiles
Follow these procedures to add and configure activity track points and open tracking profiles.
To create an activity track point
On the File menu, click Open, and then click Workflow From File.
Navigate to the assembly that contains the workflow that you want to use, and then click Open to return to the Workflow Tracking Profile Designer main screen.
On the designer surface, click an activity to select it.
This enables the Track button on the toolbar.
Click Track to track the selected activity.
To configure an activity track point
Click Events to select the activity status event that you want to track for the selected track point.
You can select all or none of the events by clicking Select All or Select None.
Click Annotate to open an Annotation tool strip.
In the text box, enter a string to describe the activity track point.
Click Extract Data, and select Properties in the list to choose the elements that will be tracked for this activity.
Select Match Derived Types to indicate that this track point will match the selected activity type and all derived types.
You can also add conditions to filter the set of emitted track points.
To add a tracking condition
Click Conditions on the selected activity track point and select Add new condition.
In the Conditions tool strip, select the member that will appear on the left side of the condition, for example, Name.
Click the == button to toggle between equality and inequality (
Enter a string value for the right side of the condition, for example, codeActivity1.
Click Save to add the completed condition.
To open tracking profiles
On the File menu, click Open, and then click Profile From File.
Select the tracking profile file to use and then click Open .
A workflow must be loaded before a tracking profile can be opened. Additionally, only profiles that are generated with this tool are guaranteed to be loaded correctly.
To save tracking profiles
On the File menu, click Save, and then click Profile as File.
Enter a path and file name using the .xml extension.
Click Save to save the tracking profile.
Using the SQL Tracking Database
If you have a SQL tracking database set up, you can also save your profiles to the database. If you have not yet created the tracking database, refer to the database setup instructions in the Simple Tracking Sample.
To use the application with the SQL tracking database
Update the application's .config file with a valid ConnectionString to the profile database.
The default configuration file looks like the following:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ConnectionString" value="Persist Security Info=False;Integrated Security=SSPI;database=TrackingStore;server=localhost"/> </appSettings> </configuration>
On the File menu, click Save, and then click Profile to SQL Tracking Database to save the current profile to the tracking database.
If the version in the database is later than the current profile, a dialog box appears and requests a later version before the profile is saved.
On the File menu, click Open, and then click From SQL Tracking Database to load a profile from the tracking database.
A dialog box appears and enables you to select a workflow type and a profile version. If the workflow assemblies are not in the same path as the designer, another dialog box appears and requests the location of the required assemblies.
Because this application is a sample, there are certain limitations with its use:
Only tracking profiles that are created by the profile designer are guaranteed to load correctly. This is because the designer creates and assumes that a single activity-tracking location will exist for a particular track point.
Tracking profiles are saved per workflow type. To save a profile as the default tracking profile, you can call the stored procedure UpdateDefaultTrackingProfile.
Annotations appear only for outermost composite activities.
You cannot add UserTrackPoints using the designer.
Creating and Using Tracking Profiles
Windows Workflow Tracking Services
Creating Custom Tracking Services
File Tracking Service and Query Sample
Task 4 : Using the Windows Workflow Tracking Service
Windows Workflow Foundation Samples
© 2007 Microsoft Corporation. All rights reserved.