Oracle® SOA Suite Tutorial Release 3 (10.1.3.1.0) Part Number B28937-01 |
|
|
View PDF |
This chapter describes the components of the SOA Order Booking application, and the requirements for creating and running it.
This chapter contains the following sections:
Section 1.1, "What Does the SOA Order Booking Application Do?"
Section 1.3, "Software Required for Creating and Running the Application"
Section 1.6, "Technologies and Techniques Used in Each Project"
Run by a fictitious company called "Global Company", the SOA Order Booking application processes orders placed by customers. The application routes each order to two suppliers, Select Manufacturer and Rapid Service, to get quotes. The application chooses the supplier that provided the lower quote to fulfill the order.
To invoke the SOA Order Booking application, Global Company provides customers with a web front-end application called the SOADemo-Client application. The SOADemo-Client application enables customers to browse products and place their orders. This web front-end application is built using Application Development Framework (ADF) technology.
When the customer places an order using the SOADemo-Client application, the client application invokes the SOA Order Booking application. The SOA Order Booking application consists of different projects, each of which performs a specific function.
The entry point to the SOA Order Booking application is the OrderBookingESB project. This project invokes the SOAOrderBooking project, which is a Business Process Execution Language (BPEL) project that orchestrates all the services needed by the SOA Order Booking application.
For more information on projects in the application, see Section 1.6, "Technologies and Techniques Used in Each Project".
The SOA Order Booking application contains two types of projects:
Projects that provide services. These projects include CustomerService, CreditService, SelectManufacturer, and RapidService. The services offered by these projects are implemented as web services so that they can be invoked by different types of clients. For example, the CustomerService project is invoked by the SOADemo-Client application and also by the SOAOrderBooking BPEL project.
Projects that define the flow of action in the application. These projects use the ESB (Enterprise Service Bus) or the BPEL technologies. These projects include OrderBookingESB, FulfillmentESB, and SOAOrderBooking, and they invoke the projects that provide services. They can also invoke other BPEL and ESB project. For example, the OrderBookingESB project invokes the SOAOrderBooking project (which is a BPEL project), and the SOAOrderBooking project invokes the FulfillmentESB project.
Table 1-1 provides a short description of the projects in the SOA Order Booking application.
Table 1-1 Projects in the SOA Order Booking Application
Project | Description |
---|---|
OrderBookingESB |
Provides the starting point for the SOA Order Booking application. The SOADemo-Client application invokes OrderBookingESB, which invokes SOAOrderBooking, which invokes everything else. |
SOAOrderBooking |
Defines the main flow of the application. It invokes all the web services and performs the appropriate actions based on the results. |
CustomerService |
Provides web services for looking up existing customers in the database, and for adding new customers. |
CreditService |
Provides web services for checking whether or not a customer's credit card is valid. |
SelectManufacturer |
Provides price quote for orders. This is one of the suppliers. |
RapidService |
Provides price quote for orders. This is another supplier. |
FulfillmentESB |
Determines how an order is to be shipped based on the dollar amount of the order. |
In addition to the SOA Order Booking application and its projects, this tutorial also describes the SOADemo-Client application, which is the web front-end to the SOA Order Booking application.
This section describes the order in which the projects are invoked.
When a customer places an order using the SOADemo-Client application, this action invokes the OrderBookingESB project.
The OrderBookingESB project invokes the SOAOrderBooking project, which defines the main flow of the SOA Order Booking application.
The SOAOrderBooking project inserts the order information in the database.
The SOAOrderBooking project retrieves customer information from the database. It does this by invoking the CustomerService project.
The SOAOrderBooking project checks the customer's credit. It does this by invoking the CreditService project.
The SOAOrderBooking project then determines if the order requires manual approval. It does this by using the rules defined in a rules repository. The application uses these rules:
If the customer's status is platinum, then the order is approved automatically, regardless of the dollar amount of the order.
For non-platinum customers, if the dollar amount of the order is greater than or equal to $1000, then the order requires manual approval. If the order is under $1000, then the order is approved automatically.
For orders that require manual approval, a manager needs to log into the Worklist application and approve (or reject) the order.
For approved orders, the SOAOrderBooking project requests quotes from the suppliers: SelectManufacturer and RapidService.
After getting responses from the suppliers, the SOAOrderBooking project selects the supplier that responded with the lower quote.
The SOAOrderBooking project selects a shipping method (USPS or Fedex) for the order. It does this by invoking the FulfillmentESB project.
The FulfillmentESB project checks the dollar amount of the order. If the amount is under $500, then it selects the USPS as the shipper. Otherwise, Fedex is the shipper.
The SOAOrderBooking project sets the order status in the database.
The SOAOrderBooking project sends an email to the customer. It does this through the Email service, which is available in BPEL.
To create the SOA Order Booking and SOADemo-Client applications, and to run them, you need the following software:
Table 1-2 Required Software
Software | Description |
---|---|
Oracle JDeveloper |
Oracle JDeveloper is the development tool that you use to develop the applications. You need Oracle JDeveloper version 10.1.3.1.0. |
Oracle Application Server |
Oracle Application Server is the runtime platform on which you deploy and run the applications. You need Oracle Application Server Release 3 (10.1.3.1.0). |
Oracle Database |
Oracle Database is used to store data such as customer, order, and product information. To run the SOA Order Booking application, you create a schema called SOADEMO in the database and install tables with sample data in the schema. Projects in the SOA Order Booking application read from and write to tables in the SOADEMO schema. You need release 10g (10.2.x) of the Oracle Database. You cannot use the Oracle Lite database that is shipped with the Windows version of Oracle Application Server. |
The SOADEMO schema consists of the following tables:
Table 1-3 Tables in the SOADEMO Schema
Table | Description |
---|---|
ADDRESS |
Stores the addresses of the customers. |
CUSTOMER |
Stores customer data. |
CUSTOMER_ADDRESS |
Is a mapping table between customers and addresses. A customer can have more than one address. |
ORDERS |
Stores order information. |
ITEMS |
Stores the items in orders. |
PRODUCT |
Stores items available for purchase. |
FEDEXSHIPMENT |
Stores order information for orders that are shipped by Fedex. |
SSN |
Stores customer ID and social security number. This table is used only to show how to add a feature to the SOA Order Booking application. See the Oracle SOA Suite Quick Start Guide for details. |
EJB_TAB_ID_GEN |
Is used internally by Enterprise JavaBeans. |
Figure 1-1 Contents of the SOADEMO Database Schema
The database sequences in the SOADEMO schema are:
Table 1-4 Sequences in the SOADEMO Schema
Sequence | Description |
---|---|
ADDRESS_EJB_SEQ_ID_GEN |
Generates the address IDs. |
EJB_SEQ_ID_GEN |
Generates the customer IDs. |
ORDER_SEQ_ID_GEN |
Generates the order IDs. |
Running in a Multi-Lingual or Multibyte Environment
If you are running the Oracle BPEL Process Manager in a multi-lingual environment or need multibyte support, it is recommended that your database character set encoding be Unicode. This means that the database character set encoding should be AL32UTF8. If the character set encoding is not Unicode, there may be possible loss or misinterpretation of data.
The steps of the tutorial begin in Chapter 2, "Setting Up Your Environment", where you begin by downloading and installing the required software and configuring the required connections in JDeveloper and Oracle Application Server.
Chapter 3 to Chapter 9 describe the projects in the SOA Order Booking application. Each chapter covers one project. You start by creating the projects that provide web services. After you have these services in place, you can create the SOAOrderBooking project, which, because it defines the main flow in the application, invokes almost all the web services.
Chapter 10, "Interfacing the Client Application with the SOA Order Booking Application", covers how the SOADemo-Client application invokes services in the SOA Order Booking application.
The SOA Order Booking application integrates SOA Suite technologies such as BPEL and ESB, and uses them to invoke web services in a defined flow sequence. The web services are independent of each other and are generated in different ways.
Table 1-5 lists the technologies and techniques used in the projects in the SOA Order Booking application.
Table 1-5 Technology and Techniques Used in the Projects
Project | Technology and Techniques Used |
---|---|
CustomerService |
|
CreditService |
|
RapidService |
|
SelectManufacturer |
|
FulfillmentESB |
|
SOAOrderBooking |
|
OrderBookingESB |
|
SOADemo-Client application |
|