JBoss.orgCommunity Documentation

Chapter 3. Examples

3.1. Overview
3.2. Quickstart Examples
3.3. ESB Examples
3.4. Importing Examples into Eclipse

This chapter provides a getting started guide to the examples. Further information on the individual examples can be found in the samples folder. This guide will describe one example from each of the categories - quickstart (pure BPEL) and ESB.

Before deploying any of the examples, you need to start the JBossAS server and ensure that RiftSaw has been installed. This can be achieved by testing whether the BPEL Console (as discussed in the previous chapter) is available.

The BPEL example we are going to try out is the simple 'hello world' example. This is located in the ${RiftSaw}/samples/quickstarts/hello_world folder.

The first step is to deploy the example to the running JBossAS server. This is achieved using the following command:

ant deploy

When the ant script indicates that it has completed successfully, the next step is to invoke the BPEL process we have just deployed.

This can be achieved using either the supplied ant script,

ant sendhello

Or by using any SOAP client, such as SOAPUI (available from http://www.soapui.org/).

The WSDL definition is located in the bpel folder, and can be used to initialise the SOAPUI client. The service location is: http://localhost:8080/bpel/processes/helloWorld.

An example message can be found in the messages subfolder.

When the message is submitted to the BPEL process, the response received is:

The ESB/BPEL example we are going to try out is the 'order management' example. When the ESB examples have been deployed, as described in the Installation chapter, then this example will be located in the ${JBossESB}/samples/quickstarts/webservice_esb_bpel folder.

The first step is to deploy the example to the running JBossAS server. This is achieved using the following command:

ant deploy

When the ant script indicates that it has completed successfully, the next step is to invoke the BPEL process we have just deployed. This can be achieved using any SOAP client, such as SOAPUI (available from http://www.soapui.org/).

The WSDL definition is located in the bpel folder, and can be used to initialise the SOAPUI client. The service location is: http://localhost:8080/bpel/processes/Retailer.

An example message can be found in the ppel/sampleData subfolder.

When the message is submitted to the BPEL process, the response received is:

This is an acknowledgement that the order has been received, and is awaiting approval. At this point, you can access the BPEL console, to see that the BPEL process triggered by the request message is still active. For example,

The next step is to access the order manager, located at: http://localhost:8080/order-manager.

Once the order has been approved, by pressing the Approve further processing will be triggered using ESB components, as outlined in the following diagram.

To verify that the BPEL processes, you should return to the instances tab on the BPEL console, which should show that two BPEL processes have now completed, as follows.

The quickstart examples, provided with the RiftSaw distribution, can be imported into an Eclipse environment as BPEL2.0 projects. This enables the BPEL and WSDL to be viewed using Eclipse based editors. Please see the JBoss Tools project for access to appropriate versions of these tools that work with the RiftSaw runtime engine.

Once imported, the BPEL and WSDL artifacts can be viewed by double-clicking the appropriate files.