Using Debugging Steps

Last Updated: 08/17/2016 Introduced in Verision: 2.0

When debugging a flow, it is sometimes useful to create debugging steps, which can provide information about or gather data from a certain step in the flow before the flow has finished running. 

Debugging steps can record information in system logs, output the current step’s flow data, output a message, or output a string.

To create a debugging step, drag any one of the Flow Management components under the category Debugging to the Flow Designer workspace, place it in the path of the step outcome to debug, and adjust the mapping and component properties to match your debugging requirements.

Example

This example will capture a basic message from a form and log it as a system error using the Flow Management component Log. Our example flow begins with a simple form step called Collect Log Info form, which was created for this example. It consists of a Text Block input component, a label, and an OK button:
 form
 
 
Begin by navigating to a Designer Folder and clicking the Create Flow button and name a new flow.

Add the Collect Log Info form to capture the message to log by expanding the Flow Designer startup window’s  Flows, Rules, Forms and Reports > Forms [Interaction] > [Current Folder] category, then selecting a Collect Log Info Form component. Click Add to add it to the workspace.

flowStarts

Expand the Flow Management > Debugging category, and drag a Log component to the workspace.

Connect the outcome paths in the flow. When the flow runs, the [Form] Collect Log Info Form opens and captures user-entered data. The Log 1 component logs that data as an error in the system (once it has been configured to do so in the following step).

flowStepsConnected

 

By default, the Log component doesn’t yet know which information to capture. Use the Mapping Editor to tell it.

Select the Log 1 step, then click the Show Mapping Editor link in the Properties panel.

There is only one input available to monitor – LogInfo. Map that to the Value field and click OK to exit the Mapping Editor.

mappingEditor

 

The Log has several options for customizing what types of logs are sent and how they appear. Make these customizations by selecting the step Log 1 and, in the Properties panel, in the Setup Log section, selecting a value from the Type drop-down list. Select Error to ensure that the inputs caught by Log 1 are sent to the same system log as true errors. Also categorize these log entries as Custom in the Category field to make the errors easier to find.

setupLogAsError

 

Our debugging step is now complete, so save the flow and run it in the Debugger.

Note that in Decisions version 3.5 and above, you will need to click Test Flow rather than Debug Flow to access the Debugger.

3.5 Test Flow Shot

A form collects our input and, with that input, creates an error entry in our systems log.

formInTheDebug

 

We can view the flow’s execution by clicking the Diagram tab.

flowDebugged

 

This debugging step can process information about the error itself, the outcome that preceded it, the user it occurred under and the time when it occurred. All that’s needed is to map and categorize the appropriate inputs into your Log component. 

To view the error message, navigate to the folder System > Logging. The message displays under the category we assigned it.

result

 

 

Additional Resources