Travel Reservation Scenario: Long-running business process orchestration using the WS-BPEL SE, and the HTTP/SOAP BC
This is a scenario packaged as a sample Composite Application and comes with every installation of the NetBeans 5.5 Enterprise Pack that can be freely downloded as part of the Java EE tools bundle from
http://java.sun.com/javaee/downloads/index.jsp.
This serves as an example of how a composite application containing a long-running business process can
be created and deployed in the JBI environment.
It leverages the
HTTP/SOAP Binding Component, and the
WS-BPEL Service Engine, during
runtime, and the NetBeans IDE during design-time.
It shows how services deployed on these different JBI component containers can be orchestrated together to solve a
business problem.
JBI Components:
- WS-BPEL Service Engine
- HTTP/SOAP Binding Component
Composite Application:
A set of Enterprise JavaBeans exposed as WebServices.
A
JBI Service Assembly consisting of the following service units
Business Use case
The following is a typical Travel Reservation Scenario where a reservation itinerary is filed with the Travel Reservation business process. On receiving the reservation itenerary, the business process checks if an Airline Reservation has been made. If an Airline reservation has not been made, the business process makes an airline reservation by invoking the external Airline Reservation Web Service.
The business process then checks if a Vehicle reservation has been made. If a Vehicle reservation has not been made, the business process makes a vehicle reservation by invoking the external Vehicle Reservation Web Service.
The business process then checks if a Hotel reservation has been made. If a Hotel Reservation has not yet been made, the business process makes the hotel reservation by invoking the external Hotel Reservation Web Service and waits for a callback from the external Hotel Reservation Service confirming the reservation. The hotel reservation service confirms the reservation by sending a callback message to the business process. If the business process does not receive a callback confirmation from the hotel reservation service within the
next 3 days and 10 hours (P
3DT
10H) for some reason, the business process cancels the hotel reservation.
The itenerary information is then passed on to the client.
Intent
This show-cases how to use the plethora of design time tools bundled in the
Java EE Tools Bundle to create a Travel Reservation composite application and deploy them on to the JBI
meta-container running on GlassFish that hosts a
WS-BPEL Service Engine and a
HTTP/SOAP Binding Component. It also demonstrates how
to debug the application using both the
WS-BPEL debugger and the JPDA
debugger dynamically switching between WS-BPEL and Java code.
Implementation using JBI
The above business case can be implemented based on SOA principles and
the JBI specification using the
Java EE Tools Bundle today. The EJB module consisting of all the EJB WebServices has to be deployed. The
Service Assembly (composite application) which consists of all the
Service Units has to be deployed.
The screenshots below illustrate the WSDL and business process related to this scenario.
| The screen-shot below shows the WSDL for the Travel Reservation Composite Application scenario in the Sun NetBeans 5.5 Enterprise Pack Beta WSDL Editor |
The screen-shot below shows the BPEL for the Travel Reservation Composite Application scenario in the Sun NetBeans 5.5 Enterprise Pack Beta BPEL Visual Designer |
 |
|
The screen-shot below shows the real-world
Open Travel Alliance Organization's XSD from
http://www.opentravel.org for the Travel Reservation Composite Application scenario in the Sun NetBeans 5.5 Enterprise Pack Beta XML Schema Editor. It is a huge
17,022-line XML Schema and is used in the real-world to make Travel reservations.

Artifacts
The project is packaged as a sample Composite Application and comes with every
installation of the NetBeans 5.5 Enterprise Pack that can be freely
downloded as part of the Java EE tools bundle from
http://java.sun.com/javaee/downloads/index.jsp.
All you need to do is From the NetBeans 5.5 Enterprise Pack IDE's main menu,
- Choose File >New Project.
- Under Categories select Samples > Service Oriented Architecture.
- Under Projects, select TravelReservation Service.
- Click Next.
For more information:Read Understanding the Travel Reservation Service from here.
Download the Java EE 5 Tools Bundle Beta from http://java.sun.com/javaee/downloads/index.jsp for FREE, and provide us feedback on the improvements you'd like to see. It combines the new Java EE 5 SDK with NetBeans IDE 5.5 Beta,
NetBeans Enterprise Pack 5.5 Early Access, and Sun Java System
Application Server Platform Edition 9. This bundle also contains
Project Open ESB Starter Kit Beta, Java EE 5 samples, Java BluePrints,
and API docs (Javadoc).