Workflow Analyzer (WFAnalyzer) was developed as a way to view how a workflow passed data between the modules. This tool has a lot of value for quickly troubleshooting and determining what to change in a management pack to get a workflow working. WFAnalyzer allows you to:
- Understand the data flow within a workflow
and read through traces produced by each module in a workflow.
Learning how workflows are composed is typically a process of trial
and error, combined with researching countless blogs, forum post,s
and search results. This is due to the fact that workflows are
effectively a “black box”. While it is true that we want our users
to be able to take "how workflows work" for granted, they need to
be able to dig in deeper and learn or triage where appropriate.
WFAnalyzer will give you the means to investigate workflows in your
production and development environments both for the purposes of
troubleshooting and learning. Authors will also become more
knowledgeable in building powerful module compositions, which
encourages MP production and innovation.
- Quicker troubleshooting. Currently
when writing an MP, you must write the MP, import it into a
management group, run it against an agent, and review event logs
and state views to see if they implemented their rule to function
correctly. A manual process such as this is very error-prone, and
in many cases may be skipped entirely when time is critical.
WFAnalyzer provides deeper insight into these workflows in a live
environment, but is also integrated with WFSimulator for viewing
the traces for a simulated workflow.
Running Workflow Analyzer
WFAnalyzer can analyze workflows running on the root management server (RMS) and workflows running on the Operations Manager agent.
Analyzing Workflows on an RMS
You can analyze workflows on an RMS if the Authoring console and the Authoring Resource Kit tools are installed.
If the Authoring console is not installed on the RMS, the Operations console must be installed and WFAnalyzer.exe must be copied to the Operations Manager installation directory from a computer on which the Authoring Resource Kit tools are installed.
For instructions on tracing and analyzing workflows, see:
Analyzing Workflows on an Agent
To analyze workflows running on an agent, .NET 3.0 must be installed on the computer on which the agent is installed. WFAnalyzer cannot analyze workflows running on an agent on computers running Windows 2000 Server or Windows 2000 Professional.
To analyze workflows on an agent, you run WFAnalyzer on the RMS to choose a workflow to analyze and initiate the trace session, and then you run WFAnalyzer on the computer on which the agent is installed to view the output of the traces.To analyze workflows on an agent
On the RMS, click Start, point to Programs (or All Programs), point to System Center Operations Manager 2007 R2, point to Authoring Tools, and click Workflow Analyzer.
In Select HealthService to analyze, select the Health Service that has the workflow you want to analyze and click Start.
The Workflow Analyzer window displays a list of workflows on that Health Service. Right-click a Failed or Running workflow in the list, and click Trace.
In the Select instance to trace window, select an instance and click Start.
Note If there are multiple instances of an object (such as SQL Database), there may be multiple instances of a workflow (one for each object instance). You can only trace one workflow at a time.
In the TraceWorkflow window, you will see two traces: submitting trace override and trace override has been submitted successfully. All subsequent trace outputs are output to an ETL file on the computer on which the agent is running.
You have two options for the TraceWorkflow window on the RMS:
- You can leave the TraceWorkflow window
open (recommended). Close the window after you are done
troubleshooting the workflow.
- You can close the TraceWorkflow
window. A Stop window appears, asking if you want to stop
debugging the current session. Click No. The override will
remain intact and the workflow will continue to trace until the
WFAnalyzer is launched again and another workflow is traced. There
can only be one workflow traced for a management group at a time.
Since the override is persisted in the database, it will survive
Agent Health Service restarts and will always trace.
Warning If you click Yes, workflow tracing on the agent will stop. When you attempt to connect to an existing trace session on the agent, WFAnalyzer will fail to show any traces or the traces will be incomplete.
- You can leave the TraceWorkflow window open (recommended). Close the window after you are done troubleshooting the workflow.
Copy WFAnalyzer.exe to the Operations Manager installation directory on the computer on which the agent is running.
On the computer on which the agent is running, run WFAnalyzer.
In the Start a new session window, the only available option is Connect to an existing Workflow Analysis. Click Start.
The TraceWorkflow window appears and displays all the traces that have been logged, even if the workflow has already hit the point where the bug happened.
For instructions on tracing and analyzing workflows, see:
Starting a New Workflow Trace Session
When you run WFAnalyzer, if a Stop window appears, asking if you want to stop debugging the current session, that means a trace is currently running.
If you click OK, the trace override is removed and the running trace session is closed. There is no way to view which workflow trace session was opened.
If you click Cancel, you can choose the Connect to an existing Workflow Trace session option. When choosing this option, the Workflow Trace Viewer window is opened and connected to the existing trace session. Data will only be shown if data is actually coming through the workflow. If this is done on the RMS and the current workflow trace session was for an agent workflow, no traces will be shown. There is no indication that the current workflow session is for a remote agent Health Service.