RuleActionTrackingEvent Sample

Download sample

This sample demonstrates how you can use tracking to determine rule actions in your workflow. Window Workflow Foundation provides an extensible tracking infrastructure that enables you to filter various tracking events based on a tracking profile. When rules execute, a RuleActionTrackingEvent object is sent as a user track point.

The sample consists of a custom console tracking service (added to the WorkflowRuntime in program.cs) and a workflow that contains a PolicyActivity activity. The rule set is evaluated when the activity is executed. The defined rules set a discount value based on the order value and customer type. The ConsoleTrackingService includes a tracking profile that includes a UserTrackPoint that covers all user track points and writes the content of the tracking data to the console.

RuleActionTrackingEvent has two properties: RuleName and ConditionResult. These properties are printed to the console upon execution of the rule.

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

  1. In the SDK Command Prompt window, run the .exe file in the RuleActionTrackingEventSample\bin\debug folder (or the RuleActionTrackingEventSample\bin folder for the Visual Basic version of the sample), which is located below the main folder for the sample.

See Also


© 2007 Microsoft Corporation. All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft