Workflow debugging, logging, and testing
Debugging a workflow is a more challenging task than debugging the standard PolicyCenter interface flow, as most of the work happens asynchronously, away from any user. Currently, there is no way to set breakpoints in a workflow in a similar fashion to how you can set a breakpoint for a Gosu rule or class.
Guidewire does provide, however, workflow logging. Each instance of a workflow has its own internal log that you can view from within PolicyCenter. (You access this log from Workflows page by first by finding a workflow, then by clicking on the Workflow Type link.) This log includes successful transitions in the current step and action. It also contains any exceptions. Workflow can access this log, but PolicyCenter only commits these log message with the bundle.
Use the following logging method, for example, in an Enter Script block to log the current workflow step:
Workflow.log(summary, description)
The method returns the log
entry (WorkflowLogEntry)
that you can use for additional processing:
var workflowLog = Workflow.log("short description", "stack trace ...")
var summary = workflowLog.summary
