A copy of this read me is included with the DB-CPTCO sample in your Liquid Data installation at <WL_HOME>/liquiddata/samples/buildQuery/db-cptco/readme.htm. (The default install home for Liquid Data is bea/weblogic700.)
This readme includes the following topics:
The sample for order query demonstrates how to use Liquid Data to create an integrated view that shows the connection of two different Enterprise Information Systems (EIS), database, and Complex Parameter Type (CPT). Creating an integrated view provides the ability to seamlessly access separate EISs using a single query.
For example, A Broadband service provider uses a relational database system to manage its customer and order information. It received a new order for a given customer via xml mapped to Complex Parameter Type (CPT). The xml for CPT consists of customer id along with one or more new orders with price and quantity that the customer will like to place. The objective is to accept or reject orders if the total amount due from all the outstanding orders (i.e. open orders) in broadband database and the total outstanding balance if the new orders are accepted is above or below the threshold. If the orders are above a limit then output Order Rejected else output Order Accepted. We use the Liquid Data engine to seamlessly access customer order information across different types of Enterprise Information Systems (EIS).
a.
Specify
a value for orderLimit parameter. If Sum of new orders and all the open orders
are above this threshold reject the order, else accept the order
b.
Specify
a location of the CPT sample XML stream for CO-CPTSAMPLE parameter for example <WL_HOME>/
liquiddata/samples/config/ld_samples/ldrepository/xml_files/coCptSample2.xml
a.
To
calculate the sum of new orders we cast the Price and Quantity from
CO-CPTSAMPLE to xs:decimal and multiplied them. Sum all the new Orders. Then
add both sums together. Follow the same sterps for the BroadBand datasource.
b.
Compared
the above sum with the OrderLimit parameter to decide whether to accept or
reject the Order.