This chapter provides details of the pre-requisites for using the RiftSaw BPEL project, and how to install the engine into a JBossAS environment.
The examples distributed with RiftSaw are split into two categories, quickstarts that are pure BPEL that can run directly in the JBossAS server, and ESB based examples that require JBossESB. If you only want to use the pure BPEL examples, then JBossESB will not be required.
Unpack the JBossAS installation into the required location.
This is only required if you want to run the ESB/BPEL examples.
Unpack the JBossESB installation into a location alongside the JBossAS installation. Then follow the instructions in the JBossESB installation (install/readme.txt), to deploy JBossESB into the JBossAS environment.
Unpack the RiftSaw distribution into a location alongside the JBossAS installation.
ant deploy
to deploy RiftSaw to JBossAS.
ant deploy-esb-examples
to
install the BPEL/ESB examples into the JBossESB samples/quickstart folder.
This chapter provides a getting started guide to the BPEL Console.
The console provides the ability to view:
The BPEL console 'home' tab is the first page presented when viewing the BPEL console.
The BPEL console can be located using the URL: http://localhost:8080/bpel.
The 'home' tab displays a summary pie graph of the status of the process instances executing within the BPEL engine, for example:
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.
Select the 'Import...' menu item, associated with the popup menu on the background of the left panal (Navigator or Package depending on perspective being viewed).
When the import dialog appears, select the General->ExistingProject from Workspace option and press the 'Next' button.
Ensuring that the 'Select root directory' radio button is selected, press the 'Browse' button and navigate to the ${RiftSaw}/samples
folder, then press 'Ok'.
All of the Eclipse projects contained within the samples
directory structure will be listed. Press the 'Finish' button to import them all.
Once imported, the Eclipse navigator will list the sample projects:
Once imported, the BPEL and WSDL artifacts can be viewed by double-clicking the appropriate files.