26 Debugging a BPM Project

This chapter describes how to use Oracle JDeveloper debugger to debug any of the BPMN processes contained in a BPM project.

This chapter includes the following sections:

26.1 Introduction to Debugging a BPM Project

You can debug any BPMN process contained in a BPM project using Oracle JDeveloper debugger. Debugging a BPMN process enables you to identify and fix any workflow or logical problems that prevent your process from running correctly.

The debugging process involves adding breakpoints to a SOA composite or a BPMN process so that the debugger stops running when it reaches one of those breakpoints and you can:

  • Trace the SOA composite or the BPMN process workflow

  • Inspect or watch the value of the process instance attributes

  • Inspect or watch the value of data objects

  • Inspect or watch correlation keys

  • Inspect or watch conversations

  • Step into calls to other components and view the normalized message values sent from and returned to the BPM component

When a process logical thread runs, it activates different frames. These frames can be nested, depending on the process flow. Each frame consists of a set of data values that represents the value of a data objects and a process instance attributes at the specific declaration level. The nesting of frames conforms the stack frame.

When a process enters a data declaration container, it activates a new frame. The different declaration containers that can appear when running a BPMN process are:

  • The BPMN process itself

  • An embedded subprocess

  • A callable process

  • An event subprocess

Each of these process containers support the declaration of data objects, correlations keys and conversations. When these process containers are activated the debugger creates a new frame.

The debugger builds the stack frame according to how these process containers are nested. The stack frame is a model that provides data visibility and enables you to access the data in a BPMN process. For example, a BPMN process that contains an embedded subprocess which in turn contains call activity to a reusable subprocess, defines three levels of nesting. The debugger thread running within the reusable subprocess contains a stack frame with three elements: the frame on the top corresponds to the reusable process, the last stack element corresponds to the BPMN process.

For more information about Oracle JDeveloper debugger, see Running and Debugging Java Programs in User's Guide for Oracle JDeveloper.

26.2 Adding a Breakpoint to a BPMN Flow Object

You can add a breakpoint to a BPMN flow object to stop the debugger when the process flow reaches that BPMN flow object.

Breakpoints define where the debugger stops while running your BPMN process. You can add breakpoints to multiple BPMN flow objects. When the debugger reaches one of these breakpoints, it stops allowing you to monitor the values of the different variables in a project. These values may help you to resolve any problems with the workflow or logic of your BPMN process.

26.2.1 How to Add a Breakpoint to a BPMN Flow Object

To add a breakpoint to a BPMN flow object:

  1. Edit the BPMN process that contains the BPMN flow object where you want to add a breakpoint.
  2. Right click the BPMN flow object where you want to add the breakpoint.
  3. Select Toggle Breakpoint.

    A red dot appears in the upper right corner of the BPMN flow object to indicate there is a breakpoint.

    A breakpoint of the type BPM Breakpoint appears in the Breakpoints View.

26.3 Adding a Breakpoint to a BPMN Component

You can add a breakpoint to a BPMN component to stop the debugger when the debugger reaches it while running an SOA composite.

Breakpoints define where the debugger stops while running your BPMN process. You can add breakpoints to multiple BPMN flow objects. When the debugger reaches one of these breakpoints, it stops allowing you to monitor the values of the different variables in a project. These values may help you to resolve any problems with the workflow or logic of your BPMN process.

26.3.1 How to Add a Breakpoint to a BPMN Component

To add a breakpoint to a BPMN flow object:

  1. Edit the SOA composite that contains the BPMN component where you want to add a breakpoint.
  2. Right click the BPMN component where you want to add the breakpoint.
  3. Select one of the following:
    • Create Breakpoint Pair

      To monitor messages entering and exiting the process.

    • Create Request Breakpoint

      To monitor messages entering the process.

    • Create Reply Breakpoint

      To monitor messages exiting the process.

    A red dot or a couple of red dots appear in the upper left corner of the BPMN component to indicate there is a breakpoint.

    A breakpoint of the type BPM Breakpoint appears in the Breakpoints View.

26.4 Disabling a Breakpoint

You can disable a breakpoint that you do not need at a certain point in your debugging.

As you progress in your debugging session you may need to remove some of the breakpoints you added and add breakpoints in other places.

26.4.1 How to Disable a Breakpoint

To disable a breakpoint:

  1. Right click the BPMN flow object that contains the breakpoint that you want to disable.
  2. Select Disable Breakpoint.

26.5 Debugging a BPM Project

You can debug any of the BPMN processes contained in a BPM project.

You use Oracle JDeveloper debugger to troubleshoot any of the processes contained in the BPM project.

26.5.1 How to Attach a BPM Project to the Debugger

To attach a BPM project to the debugger:

  1. In the Applications window, right-click the BPM project you want to debug and select the Debug action.
  2. Configure the server connection.

    This is a specific SOA debug connection that you must configure separately. For more information on how to configure the server connection, see How to Use a Project Configured for Remote Debugging in Developing Applications with Oracle JDeveloper .

    The Deploy Application dialog box appears.

  3. Select Deploy to Application Server.
  4. Click Next.

    The Deploy Configuration page appears.

  5. Optionally modify the deploy configuration.
  6. Click Next.

    The Select Server dialog box appears.

  7. Select a server or add a new server connection.
  8. Click Finish.

    The Composite editor and the Debugging window appears.

  9. Run the BPMN process step by step.

    When the debugger reaches a breakpoint in the BPMN process, it highlights the BPMN flow object where the breakpoint is.