Chapter 4. An Introductory Tutorial
4.1. Running BPEL Processes on the JBoss Enterprise SOA Platform
The "BPEL ESB Hello World" quickstart demonstrates how an ESB service can directly invoke a BPEL process, provided that:
- The BPEL engine and the ESB are located in the same JVM
- The invoked BPEL process is deployed to the BPEL engine instance running on the same ESB.
4.2. Deploy the "BPEL ESB Hello World" Quickstart
Procedure 4.1. Deploy the "BPEL ESB Hello World" Quickstart
- Check that the JBoss Enterprise SOA Platform server is running.
- Navigate to the directory containing the quickstarts:
chdir SOA_ROOT\samples\quickstarts\bpel_helloworldin Microsoft Windows).
- Deploy the quickstart by running
- Execute the quickstart by running
This command will send the text "Hello World via ESB to BPEL" to the ESB service, which will invoke the BPEL process. This in turn will append "Hello World" to the text and echo it back until it is received by the client application.
SOA_ROOT/jboss-as/samples/quickstarts/directory. Build and deploy every quickstart by using Apache Ant.
4.4. ant deploy
ant deploycompiles a quickstart's source code in the
builddirectory, then generates an .ESB file (such as
Quickstart_helloworld.esb) in the server profile's
deploydirectory. (Note that it generates .JAR files for BPEL quickstarts.) The server detects the presence of the new .esb archive and deploys it. In the .ESB archive is a deployment.xml file that
ant deployuses to configure a queue.
ant deployalso uses an XSL template to transform generic JMS queue names into the specific JMS queues needed by the target server's messaging provider. Ant selects the correct messaging provider by examining the server for a messaging provider deployment. Only JBoss Messaging, JBoss MQ, and HornetQ are detected by the build script. Other messaging providers are not supported by the quick start. Ant then puts the
deployment.xmlfile into the
build/META-INFdirectory before including it in the same .ESB archive as the rest of the quickstart.
4.5. ant runtest
ant runtestsends an ESB-unaware "Hello World" message (which is a plain String object) to the JMS Queue (
queue/quickstart_helloworld_Request_gw). It instructs Java to run the sender class (in the case of the "Hello World" quick start, this is called
org.jboss.soa.esb.samples.quickstart.helloworld.test.sendJMSMessage). By doing so, it sends a message directly to the deployed process.