4.5 Debugging a Workflow

When you’re testing a workflow, you might need to see the values of the variables you’re using in the flow. There are several ways to do this. One approach is to use the Log activity to display messages containing the variables you need to look at. After you’ve configured the Log activity, you can then see the messages in the console. In the Log activity, you can use scripting expressions in the Message property to retrieve the values you need. For example, you might use this expression to log a message containing the value of a variable defined on the flowdata object:

flowdata.get(’my_variable’)

For details on using the Log activity, see Section 8.3, Log Activity.

Another approach is to look in the workflow database to see how the data associated with the flowdata object changes as the workflow progresses from one activity to the next. To see this data, you can look at the afdocument table.

A final approach you can use during the debugging process is to change the log levels associated with the workflow system (com.novell.soa.af.impl), the provisioning requests component of the User Application (com.novell.srpr.apwa), and the evaluation of server side scripts (com.novell.soa.script). This approach might generate more information than you need, but sometimes it can be helpful. To change logging levels, go to the Logging page within the Administration tab of the User Application.