The WF team has really got it together. I’m looking through the Rules Drive UI sample that I mentioned in another post and saw in the Form constructor the addition of a FileTraceListener – and running through the sample, saw some Rule execution information being written to the file.
I noticed no Trace code inside of the sample. Turns out, the WF team instrumented for trace the Workflow Rules that gives you something like the following:
System.Workflow.Activities.Rules Verbose: 0 : 9/22/2006 8:02:54 PMRule Set "UIRulesScenario": Rule "HighPri" Condition dependency: "this/priComboBox/Text/" 9/22/2006 8:02:54 PM
System.Workflow.Activities.Rules Verbose: 0 : 9/22/2006 8:02:54 PMRule Set "UIRulesScenario": Rule "HighPri" THEN side-effect: "this/shipMethodComboBox/Text/" 9/22/2006 8:02:54 PM
System.Workflow.Activities.Rules Verbose: 0 : 9/22/2006 8:02:54 PMRule Set "UIRulesScenario": Rule "HighPri" THEN side-effect: "this/dateTimeRequired/Text/" 9/22/2006 8:02:54 PM
This is enabled by adding the TraceSwitch setting either through code or config as follows:
7 <switches>
8 <add name="System.Workflow.Activities.Rules" value="All" />
9 </switches>
The trace switch supports the TraceLevel enum allowing you to tone down the level of tracing as needed.