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 part 10, you copied several files to the appropriate server folders.

You should have the following files in the following server locations:

In the Navigator 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. From the Windows Start menu, select Active Endpoints> ActiveBPEL Designer>Start ActiveBPEL Tomcat Server. Alternately, double-click startup.bat, located in:
  3. ActiveBPEL Designer Installation folder\Server\ActiveBPEL_Tomcat\bin

  4. Tomcat starts up in a command window, and the ActiveBPEL engine also starts. Minimize the command window when you see the message “server startup.”

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 Debug.
  2. In the Debug dialog, select Remote Process and then select the New 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. Change the port number, if necessary.
  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 test client to initiate the Receive activity in tutorial.bpel, just as you did in Part 10 of the tutorial.

  1. Open a new instance of your Web browser.
  2. Type the following URL into the Address field:
  3. http://localhost:8080/ActiveBPEL_Tutorial_test_page

    Change the port number if necessary.

  4. Your browser displays the test client from which you can enter values and receive a response, as shown in the following example:
  5. tutorial test client

  6. Enter a value for the loan amount, such as 500.
  7. Ensure that the Operation is set to request.
  8. Select low for the Assessor reply. This means that the variable risk used in the Assessor invoke activity contains this value.
  9. Select yes for the Approver reply. This means the variable approval used in both the Approver invoke and the assign activities contain this value.
  10. Click Apply for a Loan.

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. Note: If you receive a remote debugging error message from ActiveBPEL, it means that your workspace copy of the process file is missing. ActiveBPEL displays your local copy of the process while remote debugging. To correct the error, import tutorial.bpel into the ActiveBPEL_Tutorial project in the Navigator and re-instantiate the process.

    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 InvokeLoanAssessor activity. The request variable displays the data from the test client request.
  5. Click Step Over to highlight the Assign. The risk variable contains the low value. Your Designer should look like the following example.
  6. Debugging path for remote process

  7. Click Step Over to highlight the Reply. The debug highlighter moves through the Assign activity, and the accept part of the approve variable displays yes.
  8. Click Step Over to terminate and disconnect the process automatically.
  9. View the test client in your browser. It should look like the following example.
  10. tutorial test client with success message

  11. When you are done remote debugging, close the Tomcat command window.
  12. Switch out of the ActiveBPEL Debug perspective by selecting the ActiveBPEL Designer perspective icon from the Fast View bar on the left margin of the application window.

ActiveBPEL Enterprise users can download the tutorial Web services support files for their product from www.active-endpoints.com.