Skip Headers
Oracle® SOA Suite Tutorial
Release 3 (10.1.3.1.0)

Part Number B28937-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

1 Introduction to the SOA Order Booking Application and the Tutorial

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:

1.1 What Does the SOA Order Booking Application Do?

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:

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.

1.2 Flow of the Application

This section describes the order in which the projects are invoked.

  1. When a customer places an order using the SOADemo-Client application, this action invokes the OrderBookingESB project.

  2. The OrderBookingESB project invokes the SOAOrderBooking project, which defines the main flow of the SOA Order Booking application.

  3. The SOAOrderBooking project inserts the order information in the database.

  4. The SOAOrderBooking project retrieves customer information from the database. It does this by invoking the CustomerService project.

  5. The SOAOrderBooking project checks the customer's credit. It does this by invoking the CreditService project.

  6. 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.

  7. For orders that require manual approval, a manager needs to log into the Worklist application and approve (or reject) the order.

  8. For approved orders, the SOAOrderBooking project requests quotes from the suppliers: SelectManufacturer and RapidService.

  9. After getting responses from the suppliers, the SOAOrderBooking project selects the supplier that responded with the lower quote.

  10. The SOAOrderBooking project selects a shipping method (USPS or Fedex) for the order. It does this by invoking the FulfillmentESB project.

  11. 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.

  12. The SOAOrderBooking project sets the order status in the database.

  13. The SOAOrderBooking project sends an email to the customer. It does this through the Email service, which is available in BPEL.

1.3 Software Required for Creating and Running the Application

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.


1.4 Contents of the SOADEMO Schema

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

Database Schema Diagram
Description of "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.

1.5 How This Tutorial Is Organized

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.

1.6 Technologies and Techniques Used in Each Project

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

  • Uses EJB 3.0 entity objects that are generated from database tables. JDeveloper is used to generate the entity objects.

  • Uses JSR-181 Web Services Metadata annotations.

  • Uses a stateless session bean as the session facade. The session bean is generated by JDeveloper.

CreditService

  • Shows "top-down" implementation of web services: starting with a WSDL file, you use JDeveloper to generate Java classes from the WSDL file.

RapidService

  • Shows "bottom-up" implementation of web services: starting with Java classes, you use JDeveloper to generate a WSDL file.

  • Uses JSR-181 Web Services Metadata annotations in the Java files.

SelectManufacturer

  • Shows a simple asynchronous BPEL process with Receive and Invoke activities.

FulfillmentESB

  • Shows routing services that use filters to check input data. The filters then direct the requests to the appropriate targets.

  • Uses transformation rules to transform data appropriately for writing to databases and files. Database adapters and file adapters perform the writes.

  • Shows a routing service that routes to a JMS adapter.

SOAOrderBooking

  • Shows how to use BPEL to orchestrate a flow sequence.

  • Invokes the services provided by all the projects (except for OrderBookingESB).

  • Invokes other BPEL flows (the SelectManufacturer BPEL project).

  • Invokes ESB project (the FulfillmentESB project).

  • Shows how to integrate Oracle Business Rules with BPEL.

  • Shows Decision Service.

  • Sends email through the Email service.

  • Uses the flow activity to send requests to RapidService and SelectManufacturer.

  • Uses the human task to set up a step that requires manual approval.

OrderBookingESB

  • Invokes a BPEL project (the SOAOrderBooking project) by using a SOAP service.

SOADemo-Client application

  • Shows how to invoke an ESB project from an ADF application (the "place order" button invokes the OrderBookingESB project).

  • Shows how to call the CustomerService project from the "login" button.