B2J Beginners Tutorial (How to run BPEL using B2J)

Author: Antony Miguel, Last Updated 14th March 2006

Overview

  • This document explains how to use B2J to run BPEL processes using the B2J reference engine implementations.

    This document assumes the user is familiar with Eclipse.

Requirements

  • The user should have an installation of Eclipse and the B2J subproject plugins installed. See the B2J subproject main page for versions, downloads and installation information.

Tutorial


  1. B2J is a BPEL to Java translation framework with two reference implementations able to execute BPEL.

    The first step to executing BPEL with B2J is to switch to the Java perspective.

    Under the Eclipse Window menu select Open Perspective / Other, then select the Java perspective.








  2. Next you should download the sample BPEL files from the B2J main web page or from here.

    Create a new Simple project and unzip these files into it. You should see a folder called bpel_examples containing two further folders; tests and tptp. The BPEL files you can run are any of the BPEL files under the tests folder.




  3. Once you have the sample BPEL files set up in a project, you can run one using the B2J Launch Configuration.

    Select the Run menu and choose Run..., you should see the launch configuration window pop up.








  4. Right click on the BPEL Process (B2J) item and select New. A new launch configuration should appear.

    From here you should see a tree of BPEL Providers with two providers in it: Workspace File and Local File.

    BPEL Providers are an extension point exposed by B2J to allow 3rd parties to plug in other sources of BPEL to run. The two default BPEL Providers are configured by setting a file path and they then provide the BPEL to the B2J framework by simply reading the specified file. These are BPEL Providers in their most basic form.

    3rd party BPEL Providers could potentially be configured in more complex ways and could generate BPEL to be run in B2J rather than relying on a static file.




  5. Since the files we want to run are in the Eclipse Workspace (rather than somewhere else on the local filesystem) select the Workspace File provider and click the Workspace File tab at the bottom of the window.

    You should now see a text box with a browse button to allow you to choose a BPEL file to run.








  6. Click the Browse button and browse to a BPEL file under the unzipped BPEL samples folder.

    Choose the file test_general.bpel under the test_general folder.








  7. Once you have chosen the BPEL file you wish to run, click OK to return to the main dialog and click Apply to save your choices.








  8. The other tabs: Distribution, and Common contain default values. In the Distribution tab, it is possible to specify multiple hosts to distribute a single BPEL process.

    The details of this process can be found in the B2J distribution tutorial.

    By default, the BPEL process will run in the local Eclipse JVM.








  9. To start the execution of the BPEL press Run




  10. The Eclipse Console will pop-up with the BPEL execution output. When running locally, for our example, the console should display:








  11. Feel free to repeat the process for any of the sample BPEL processes and feel free to modify them to experiment. Some of the BPEL processes may require further configuration to run such as ones that use external web services (test_soap).