JBoss.orgCommunity Documentation

Chapter 11. Debugging processes

11.1. A simple example
11.2. Debugging the process
11.2.1. The Process Instances View
11.2.2. The Audit View

This section describes how to debug processes. This means that the current state of your running processes can be inspected and visualized during the execution. Note that we currently don't allow you to put breakpoints on the nodes within a RuleFlow directly. You can however put breakpoints inside rules (that could be evaluated in the context of a process if you use a ruleset node), or on any Java code you might have (i.e. your application code that is invoking the engine or invoked by the engine, listeners, etc.). At these breakpoints, you can then inspect the internal state of your processes.

A screencast that shows processing debugging in action can be found here

We use a simple example throughout this section to illustrate the debugging capabilities. The example will be introduced first, followed by an illustration on how to use the debugging capabilities.

Our example contains two processes and some rules (used inside the ruleflow groups):

We will simulate the execution of this process by starting the process, firing all rules (resulting in the executing of the hello rule), then adding the specific milestone events for both the milestones (in the main process and in the subprocess) and finally by firing all rules again (resulting in the executing of the goodbye rule). The console will look something like this:

Hello World
Executing action
Goodbye cruel world

We now add four breakpoints during the execution of the process (in the order in which they will be encountered):

When debugging the application, one can use the following debug views to track the execution of the process:

The process instances view shows the currently running process instances. The example shows that there is currently one running process (instance), currently executing one node (instance), i.e. RuleSet node. When double-clicking a process instance, the process instance viewer will graphically show the progress of the process instance. At each of the breakpoints, this will look like: