Workflow Analyzer (WFA) is a great tool to debug your Management Packs. It is part of the MP Authoring Toolkit you can download here. Many blogs reported about it and many event described how to use it, see Steve Rachui’s post. Despite being such a nice tool I always found troubles when trying to trace workflows running on a remote agent (i.e. not the RMS). More often than not the workflow analyzer would stop in exception, freeze, or have some sort of crash. The bad news is that I hadn’t patched it, the good one is I have a workaround for you if you’re plagued by the same issues.
First of all a quick insight on how workflow tracing works:
- once a workflow is selected to be traced an override is created in a custom MP, the override sets to true the "TraceEnabled" property of the workflow for the specific instance you want to trace
- when the override reaches the agent a run time trace named "WorkflowTrace" is created on the target machine
- when you launch the WFA on the target agent it should translate the trace into a text file and show you the resulting output (with some filtering if you want)
Item 3. is where the WFA crashes, but there’s nothing that prevents us to emulate the WFA behavior formatting the trace and opening it with our preferred viewer. To do this, instead of launching WFA you just need to run the following command line: "tracefmtsm.exe" -rt "WorkflowTrace" -display -nosummary -o "WorkflowTrace.log" -tmf "C:\Program Files\System Center Operations Manager 2007\Tools\All.tmf" and check the contents of WorkflowTrace.Log file. In this way you don’t even need to install/copy WFA on the target agent, just set up the tracing session targeting the proper agent and you’re done.
For those who are curious the tracing override created by WFA is similar to the following:
<MonitorPropertyOverride ID="WorkflowDebugger.WorkflowTraceOverride" Context="Progel.EWS.Mailflow.Server" ContextInstance="65264938-140d-aa74-f2e7-e4cb6160491a" Enforced="false" Monitor="Progel.EWS.Mailflow.Mailflow.Monitor" Property="TraceEnabled">
This posting is provided "AS IS" with no warranties, and confers no rights.