Oracle® SOA Suite Developer's Guide 10g (10.1.3.1.0) Part Number B28764-01 |
|
|
View PDF |
Global Company sells electronic devices through many channels, including the web. Customers can visit the web site, register, and place orders for the products. In order to register customers and fulfill orders, several applications both internal and external to Global Company work together in the following way:
When a new customer registers in the web client, a web service invokes the CRM application, which then stores the customer information in its database.
When a registered customer attempts to log into the web client, the web client again uses a web service to invoke the CRM application, which provides authentication.
When a customer places an order, the following takes place:
A flow in Oracle ESB receives a message containing order information, transforms the message for a BPEL process flow, and invokes that process, providing it with the transformed order information.
A BPEL flow then:
Sets the order to a pending state, and inserts the order information into the database.
Retrieves customer information by placing a synchronous call to a web service that retrieves information from the CRM application.
Validates the retrieved credit card information through a synchronous call to the external credit validation service. If the credit card is not valid, the process cancels the order. If the card is approved, the flow continues.
Uses a decision service to determine whether or not the order requires manual approval. The decision service uses a rule that states the following: If the customer has platinum status, the order does not require approval. If the customer has gold status, approval is required only for orders over $1,000. If the customer has silver status, then all orders must be approved.
If the order requires manual approval, a human workflow routes a message to an employee at Global Company who has authority to approve orders. The employee then uses the Oracle BPEL Worklist Application web-based application to view the order, and either approve or disapprove it. The message is sent back into the BPEL flow. If the order is not approved, the process cancels the order. If it is approved, the flow continues.
Once the order is approved, or if the order does not require manual approval, sends the order information to two suppliers: Rapid Manufacturer and Select Manufacturer. Each supplier returns a price (one synchronously and one asynchronously). The flow then uses a conditional expression that determines which supplier returned the lower price, and assigns the order to that supplier.
The flow then uses Oracle ESB routing rules to determine the vendor that will ship the order. If the order is over $500, the order information is sent to Federal Express. If it is under $500, the information is sent to the United States Postal Service.
Sets the order to complete, and invokes a notification service, which sends an email to the customer.
Figure 2-6 shows the flow of information through the various components and applications that make up the SOA Order Booking application.
For a detailed description of each how each application works at runtime, see Section 2.5, "Taking a Closer Look at the SOA Order Booking Application".