Debugging Process Definitions

Process definitions can be - even before they have been deployed - debugged in the modeling environment. To work with the debugger change to the debug perspective by choosing Window > Open Perspective > Other... and from the list select the Test Perspective perspective.

It is only possible to debug your model if it is consistent. A consistency check will be performed automatically with the start of the debugger. Note that the model should not be changed during debugging, because the engine will not notice a model change after the debugging started.

Debugging Spring Bean Applications

Please note that if you debug spring bean applications you need to set up an extra configuration file, as described in the chapter Debugging Spring Bean Applications of the Spring Integration Guide.

Starting the Debugger

There are several possibilities to start the debugger:

Starting the Debugger by setting up a Configuration

In the main menu select the debug icon (the green bug) and choose Open Debug Dialog... from the pull-down menu.

Open the Debug Dialog
Figure: Open the Debug Dialog

A dialog comes up in which you set the configurations for your debug application. To create a new debug configuration:

  1. Select Process Model on the left side of the dialog.
  2. Click the new configuration icon .
  3. Choose the Main tab and fill in the name for the debug configuration, the project name, the model name and the process you want to debug.
  4. Click Apply.

Figure: Debugger Configurations

Now press the Debug button.

Starting the Debugger with the predefined Configuration

In the main menu select the debug icon and choose Debug As > Debug Process Model from the pull-down menu.

Figure: Starting the Debugger with predefined Configuration

Starting the Debugger from the Diagram

In the open diagram of your process right-click the canvas and select Debug from the context menu.

Starting the Debugger from the Diagram
Figure: Starting the Debugger from the Diagram

Starting the Debugger from the Outline View

In the Outline View right-click the process to debug and select Debug from the pop-up menu.

Starting the Debugger from the Outline View
Figure: Starting the Debugger from the Outline View

The Debug Perspective

The Debug Perspective is supplemented with several views to work with:

Figure: The Debug Perspective

The Debug View

This view allows you to manage the debugging or running of a process of your workflow. It displays the stack frame for the suspended activity threads for each target you are debugging. Each thread in your process appears as a node in the tree. If the thread is suspended, its stack frames are shown as child elements.

To resume the execution of a suspended thread, select the thread or its stack frame. Click the Resume button (the green arrow) in the toolbar or press the F8 key. The thread resumes its execution, and stack frames are no longer displayed for the thread.

For more detailed information on the Debug view, refer to the Eclipse Help.

Figure: The Debug View

The Process Worklist View

The Worklist view is grouped by the participants and users, who perform the interactive activity instances. When the debugger starts the process execution, activities are instantiated. If the execution of the process instance arrives at an interactive activity which is assigned to a performer - a role, an organization, a user or a user group - a work item representing an instance of this activity is added to the worklist tree of this performer.

You can activate the current activity instance either by double-clicking on its symbol or by clicking on the red-gear icon in the toolbar. In the tree all the roles that already performed activities remain visible.

The Process Worklist View
Figure: The Process Worklist View

The Breakpoints View

The Breakpoints view lists all the breakpoints you have set in the workbench projects. You can double-click a breakpoint to display its location in the editor. In this view, you can also enable or disable breakpoints, delete them, or add new ones. For more detailed information on working with breakpoints refer to the Eclipse Help.

Figure: The Breakpoints View

The Variable View

In the Variables view you can examine the contents of your process variables and data values. For more detailed information on debugging variables refer to the Eclipse Help.

Figure: The Variables View

The Diagram View

In the Diagram view of the debugger you can visually follow the process of your debugging. Likewise, the diagrams in the Workflow perspective a graph of activities and its connections is displayed. In this view the activities get different colors depending on their current state.

When an activity is in suspended mode, its border is yellow. As soon as it is selected the border becomes blue.

Figure: States of Activities shown in different Border Colors

After the activity is completed, its border becomes green and the activity to be executed next becomes yellow bordered. Proceeding the next activity by pushing the green arrow button or double-clicking on it in the Process Worklist will process the data and load the dialog representing the successive interactive activity.

Figure: A Completed and a Suspended Activity

The Source View

The Source view opens the source code of the class you are using in your process and where you have set breakpoints. You have the possibility to step through the code in this view. See section Debugging Java Code for information about debugging your Java code.

Debugging Java Code

If you want to debug Java code you call for example in a Plain Java Application. You can set breakpoints in this code (see also the Breakpoint View). The debugger will stop there and open the code in the Source View, so that you can step through it. Thus, you have the possibility to view your process variables in the Variable View.

For more detailed information on stepping through the execution of a Java program, refer to the Eclipse Help.

Figure: Stepping through your Java Code

Please notice that it is not recommended to suspend the VM, because the Infinity Process Platform debugger works with internal communication breakpoints and by suspending you would stop all threads.

Starting and stopping the Debugger

To start the debugging you can either:

You can debug not only linear processes but also processes with splits and joins and even subprocesses.

Be aware that it is only possible to debug one process.

Debugging in Multi-model Environment

You can debug models with provider and consumer relationship. Once you start the debugger in the consumer model, the debugger traverse from consumer model to the provider model. Once the debugging of the provider model is over the debugger returns to the consumer model. If a cross-model reference cannot be resolved during debugging, because the provider model is not available, an error message is displayed. The debugger also supports dynamic subprocess binding.

In cases where several model versions apply for invocation in the debugger (for example, if there are several versions of the model implementing the process interface to be invoked), the debugger proceeds as follows: