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">
<Value>true</Value>
</MonitorPropertyOverride>
– Daniele
This posting is provided "AS IS" with no warranties, and confers no rights.
#1 by Jonathan on April 18, 2013 - 6:29 pm
The tool doesn’t seem to work any longer for submitting override traces in SC2012.
#2 by Daniele Grandini on April 19, 2013 - 6:25 am
hi Jonathan, I’m actually using it with oosmgr 2012 without any glitch. which version are you using? which error do you get?
#3 by Jonathan on April 19, 2013 - 6:48 am
Just tried today using the R2 reskit WFA. It launches, and I can see the workflows. But when I select a workflow to trace, the tool crashes on submit and the trace never gets enabled on the client. There was no error that I recall, but I don’t have it in front of me at the moment. Using OM12 w/SP1, Windows 2008 R2 management server and agent.
#4 by Daniele Grandini on April 19, 2013 - 7:45 am
If I can recall correctly a new version for OM2012 has been realeased, mine is dated April 24th, 2012.
#5 by Jonathan on April 19, 2013 - 4:30 pm
Just looked at my version of WFA, and it’s dated 10/16/2009. I even tried reinstalling using fresh bits from the download page: http://www.microsoft.com/en-us/download/details.aspx?id=18222. Where did you obtain a later copy?
#6 by Daniele Grandini on April 22, 2013 - 7:58 am
uhm good question, let me check ’cause I don’t really remember where I got it
#7 by Daniele Grandini on April 23, 2013 - 1:29 pm
It’s included in VS Authoring Extensions for OpsMgr http://social.technet.microsoft.com/wiki/contents/articles/5236.visual-studio-authoring-extensions-for-system-center-2012-operations-manager.aspx
#8 by monsterjta on April 24, 2013 - 2:54 am
Thanks for checking on that. I did not realize WFA came with VSAE…
#9 by Javier Ayllon on March 19, 2013 - 12:56 pm
Thank you, saved my day!