Debugging is essential in a scenario where you create a DMN model and need to locate a fault in how it executes. Debugging allows you to inspect all the parameters and values of every model in the execution context. You can debug any DMN model, including Boxed Expressions, Decision Tables, and Decision Requirement Diagrams (DRD).

There are six icons in the toolbar that are relevant to debugging. Listed left to right:

Debug Toolbar
  • Start Debugging: This allows you to debug the currently opened logic and go through it step-by-step.
  • Logic Run Template: Opens the screen to Run/Debug a run a re-defined template with the input values of a specific project.
  • Stop: This stops the debugging process by completing the execution.
  • Terminate: Terminate debugging without executing the rest of the process.
  • Next Step: Goes to the next step of logic.
  • Next Breakpoint: Go to the next breakpoint.

Start to debug the DMN model by applying input

Click on the Start Debugging icon to run a model in debug mode. The first step asks for input value.

A logic run template, which includes your created Run Template, can also do this.

RunTemplate

Debugging all the elements in the DMN model one by one

To debug and explain the steps, the Selecting Hiking Gear sample project is selected. You can see the details of this sample project on this resource hub page.

After selecting the input value, click Next Step to go through a model step-by-step. In a DRD when you get to a node linked to another model it will ask if you want to go to that model and step through it.

Openthe logic document pop-up

The Selected Gear logic document is a decision table. So if we click on “Yes,” we go through to debug the decision table.

When debugging a decision table, a row highlighted in yellow is about to be executed, while green means it has been executed and the condition has been met.

Debuging a decision table

After debugging the decision table, the debug model goes back to the DRD to continue debugging the model. In the next step, we have a boxed expression to select the condition of the gear. If we click on “Yes” to navigate through it, we automatically go to the boxed expression to debug.

Debugging a boxed expression

Summary

In the Debugging mode, you can run any Decision Model and Notation (DMN) model in FlexRule Designer. That means you can get more details information regarding logic execution. This happens by clicking on the debug Icon, providing input, and navigating through the DMN model.