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.
If you have previously installed RiftSaw-2.0.0.Final, then you will need to drop the database schema
due to changes in the ODE db schema for version 1.3.4. This can be achieved using the scripts in the
${riftsaw}/conf/sql
folder, or configure the jdbc properties file in ${riftsaw}/conf/jdbc
and running:
ant -D{database} drop.riftsaw.schema
from the ${riftsaw}/conf
folder.
Unpack the JBossAS installation into the required location.
This is only required if you want to run the 'samples/esb' folder's 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.
If you intend to install the jbossesb, it must be deployed to the application server before riftsaw.
Unpack the RiftSaw distribution into a location alongside the JBossAS installation.
From the install folder, run:
ant deploy -Ddatabase=... -Dws.stack=... -Dws.version=...
to deploy RiftSaw to JBossAS, specifying a database and mandating the upgrade of the web service stack for JBossAS. The list of available databases, and how they should be configured, is explained in the next sub-section; the list of options for update of the web service stack is discussed in the one following it.
Please note that RiftSaw should not be deployed while JBoss AS is running.
User Guide
's RiftSaw Clustering Support chapter.
To de-install the RiftSaw distribution,
From the install folder, run:
ant undeploy -Ddatabase=....
to remove RiftSaw from JBossAS. The database option should specify the same value used during installation of RiftSaw.
$JBossAS/server/${config}/lib
folder and remove it manually.
The following "in-memory" databases are available. If just evaluating the capabilities of RiftSaw, it is recommended that one of these options is used to reduce the time taken to get RiftSaw up and running.
Other databases available, that require further configuration details, include:
The configuration properties for these database options can be found in the
${RiftSaw}/conf/jdbc
folder. These properties need to be
specified before executing the ant deploy -Ddatabase=...
command.
Upgrading the web service stack for JBoss AS is now required. The following command:
ant deploy -Ddatabase=... -Dws.stack=... -Dws.version=... -Dorg.jboss.as.config=...
will help you download the web service stack, and then upgrade it for JBoss AS, while deploying RiftSaw.
OR you could go to the jbossws download page http://jboss.org/jbossws/downloads.html to get the specific distro that you want, and doing the upgrade according to $jbossws/docs/Install.txt
This chapter provides a getting started guide to the examples. Further information on the individual examples can be found in the samples folder.
If using the Eclipse BPEL editor, bundled with
JBoss Tools, then you can import
the quickstart samples as Eclipse BPEL projects, by selecting the import
menu item on the left navigation panel in Eclipse, and choosing the
General->Existing Projects into Workspace option. Then
select the individual sample you wish to import, or alternatively select the
${RiftSaw}/samples/quickstart
folder to select multiple
(or all) samples for import. Please see the RiftSaw User Guide for information
on how to deploy the BPEL samples to the server.
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 User Guide) is available.
The BPEL example we are going to try out is the simple
'hello world' example. This is located in the
${RiftSaw}/samples/quickstart/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 runtest
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/Quickstart_hello_worldWS.
An example message can be found in the messages
subfolder.
When the message is submitted to the BPEL process, the response received is:
If you then wish to modify the example and deploy a new version, you will need
to either update the 'version' property within the build.xml
,
or specify the version when performing the command, e.g.
ant -Dversion=2 deploy
and similarly when undeploying,
ant -Dversion=2 undeploy
When modifying a previously deployed BPEL deployment, it will be necessary to either undeploy the previous version, or increment the version number. If you attempt to deploy a BPEL deployment unit with the same name as an already deployed unit, then the server will generate an exception.
Currently the version must be specified as a single integer value. Non-numeric values, such as versions expressed in a major.minor.incremental (maven style), will result in an exception when deployed to the server.
This quickstart example demonstrates how an ESB service can directly invoke a BPEL process running inside RiftSaw, as long as RiftSaw and the ESB are co-located in the same JVM, and the invoked BPEL process is deployed to the RiftSaw instance running co-located with the JBossESB.
The example that we are going to use is located in the
${RiftSaw}/samples/esb/bpel_helloworld
folder.
Also note that the quickstart described in the preceding section,
located in the ${RiftSaw}/samples/quickstart/hello_world
must still be deployed. If this example is not deployed, then please follow
the instructions in the previous section to deploy the example.
The next step is to deploy the ESB service that will invoke this "hello world"
BPEL process. This is achieved by performing the following command in the
${RiftSaw}/samples/esb/esb_helloworld
folder:
ant deploy
Once the ESB service has been successfully deployed, then run the following command:
ant runtest
This command will send the text "Hello World via ESB to BPEL" to the ESB service, which will invoke the BPEL process, which in turn will append "World" to the text and echo it back until it is received by the client application.
For more information on the ESB to RiftSaw integration, please see the User Guide.
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.