Enabling workflow tracing can help you resolve problems with workflow activities and understand the workflow process.
In a clustered environment, tracing occurs on each instance.
To debug workflows in a multiple server deployment environment, consider shutting down all but one server. If all servers are running, you cannot determine which server in the environment is executing the workflow, which causes troubleshooting problems.
Use the following steps to enable workflow tracing:
Open a browser and log in to the Waveset Administrator interface.
From the System Setting page, choose Configuration from the List Objects Type menu.
Click the List Objects button.
When the List Objects of type: Configuration page displays, scroll down the list of objects to locate the System Configuration object and click the edit link.
When the Checkout Object: Configuration, #ID#CONFIGURATION:SYSTEMCONFIGURATION page displays, you can edit any of the following workflow options in the SystemConfiguration object:
Typically, you enable only one option, but it is possible to enable more than one option at a time.
These attributes are not dependent on each other. You can turn on one type of trace while the other types are turned off.
Specify workflow.consoleTrace=true to redirect workflow trace messages to the application server console, which can be useful when workflows are terminating due to a fatal exception because this attribute prints more trace output than workflow.fileTrace. (Default value is false.)
Specify workflow.fileTrace=PathtoFileto redirect workflow trace messages to a file that is easy to read. This attribute does not have a value by default.
Add a value tag to the workflow.fileTrace attribute and, using Unix-style forward slashes, enter the path to a log file. Waveset stores relative pathnames relative to the application server’s installation directory. For example:
On Windows. <Attribute name=’fileTrace’ value=’C:\mydir\workflow.txt’/>
On Solaris/UNIX. <Attribute name=’fileTrace’ value=’/mydir/workflow.txt’/>
Specify workflow.traceLevel=tracingLevel to specify the level of workflow tracing you want to see.
Specify workflow.Trace=true to trace workflow processing. You must restart the application server to start tracing with this option. Waveset stores the trace results in the task’s WavesetResult object. Use this tracing option when file system access is unavailable. (Default value is false.)
Trace messages in the task’s WavesetResult. (Default value is 1.)
Specifying workflow.Trace=true appends trace messages into one long, unformatted string that is difficult to read. Use this option only when you do not have access to the file system.
With the first two options, you might lose some of the workflow trace if a fatal exception occurs.
Save the SystemConfiguration object.
Restart your application server, or reload the SystemConfiguration object from the Waveset debug area.
Use one of the following methods to enable tracing for a designated workflow:
Editing the WFProcess definition. To enable trace unconditionally for a particular process, edit the XML of the TaskDefinition object by adding the trace=’console ’ attribute to the <WFProcess> element.
Editing the workflow variable. Gives you more control over the timing of tracing by using a workflow variable. The workflow engine will look for a top-level workflow variable named trace.
The following example shows how to trace a workflow variable.
<Variable name=’trace’> <cond><eq><ref>accountId</ref><s>jfaux</s></eq> <s>workflowTrace.txt</s> </cond> </Variable>
The trace variable turns tracing on only if the workflow is operating on a user named jfaux. You could also specify trace in a form field to control tracing interactively.
In this example, the trace output is written to the workflowTrace.txt file.