ActiveBPEL® Designer User’s Guide

Tutorial Part 11: Debugging Your Process Remotely

To start at the beginning of the tutorial, see Introduction to ActiveBPEL Tutorial.

If you have followed all tutorial parts so far, you have deployed and run a BPEL process on the ActiveBPEL server.

Before starting this part of the tutorial, we recommend that you complete Tutorial Part 10: Running the Process on the Server.

In the Project Explorer view of ActiveBPEL, you should have the following files:

By completing Part 11 of the tutorial, you will be able to:

Step 1: Add a breakpoint to tutorial.bpel

You can connect to a running or completed process from within ActiveBPEL Designer for remote debugging. There are several options for remote debugging, and we will set a breakpoint in the process and then attach to the running process when the breakpoint is hit.

  1. Open tutorial.bpel in the Process Editor.
  2. Right-mouse click on the Receive activity and select Add Breakpoint. The Receive activity should look like the following example.
  3. Receive activity with breakpoint set

Step 2: Start the server

The server must be running in order to start remote debugging, so start the server now (if it is not already running) before setting up a debug configuration.

  1. If the server is already running, as described in Part 10 of the tutorial, you can skip to the next Step.
  2. Select the Servers view in the lower right of the workspace, and select Start the Server.

Step 3: Create a configuration for launching a remote debug session

A remote debug configuration indicates where processes are running and how you want to attach to them.

  1. From the Run menu, select Open Debug Dialog.
  2. In the Debug dialog, select Remote Process and then select the New Launch Configuration icon in the toolbar.
  3. In the Name field, type tutorial_run_to_breakpoint.
  4. In the Main tab, note that the default Server URL is displayed for deployed ActiveBPEL processes.
  5. In the Process Selection panel, select Manual process selection or breakpoints. This selection indicates that you do not want to immediately debug a process, but rather will select a process manually.
  6. Enable the option Attach to any process on breakpoint to indicate that a process containing a breakpoint will be attached to, if not already attached, when a breakpoint is hit.
  7. Your Debug configuration dialog should look like the following example.

    Debug configuration dialog

  8. Select Debug to begin remote debugging for the current configuration.

Your Debug view should look like the following example.

Debug view showing remote process

Step 4: Instantiate the process

You can create an instance of the process by using the Web Services Explorer, as you did in Part 10 of the tutorial.

  1. Open the WSDL Main page of the Web Services Explorer and add the URL for the TutorialService, and select Go.
  2. In the Loan Request body, type Jones in the Last Name field, and add an amountRequested of 10001.
  3. As you will see, the approval and assessor services have built in logic based on the last name of Jones (and also Smith) for different loan amounts.

  4. In the Web Services Explorer, select Go.

Step 5: Begin remote debugging

  1. In ActiveBPEL Designer, open all variables in the Process Variables view and position the view next to the Process Editor canvas. Your Process Editor should look like the following example.
  2. Simulation highlights receive activity with breakpoint

  3. Notice that the running process is stopped on the Receive activity with the breakpoint, as we configured.
  4. In Debug view, click the Step Over icon on the toolbar. The debug highlighter moves to the InvokeLoanApprover activity. The creditInformation variable displays the data from the Web Services Explorer.
  5. Click Step Over twice to terminate and disconnect the process automatically.
  6. Inspect the approval variable. Notice that Jones is not going to get a loan. The reply indicates a decline, as shown.
  7. approval variable with declined results

  8. Repeat Step 4 above by adding different Last Name and amountRequested values.

The LoanApproval and RiskAssessment services are built on the following logic:

5000 <loan amount <=20000

Jones is declined, all others approved

20000<loan amount<=50000

Only Smith is approved, all others declined

loan amount>50000

Everyone is declined

Last name: Approvefault

Loan approver faults

Last name: Assessfault

Loan assessor faults

Next Steps

Import the BPEL for People (B4P_Sample) project from the tutorial folder, which replace the Invoke Loan Approver activity with a People activity, as shown in the illustration. The readme.txt file that accompanies the BPEL for People sample describes how to deploy and run the sample. You can also review the ActiveBPEL BPEL for People online help for details on building a People activity to add human workflow to your BPEL process.