News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

Building Your First Data Transformation in Java

Started by thiruvasagamani, Aug 18, 2008, 02:51 PM

Previous topic - Next topic

thiruvasagamani

Data transformation is the mapping and conversion of data from one format to another. For example, XML data can be transformed from XML data valid to one XML Schema to another XML document valid to a different XML Schema. Other examples include the data transformation from non-XML data to XML data. This tutorial introduces the basics of building a data transformation by describing how to create and test a XML-to-XML data transformation using WebLogic Workshop.

In WebLogic Integration business processes, a data transformation transforms data using queries (written in the XQuery language). This tutorial describes the steps for building a query in the XQuery languageā€”a language defined by the World Wide Web Consortium (W3C) that provides a vendor independent language for the query and retrieval of XML data.

The data transformation created in this tutorial is invoked in the RequestQuote business process. This business process is created to meet the business needs of an enterprise. The enterprise starts the business process as a result of receiving a Request for Quote from clients, checks the enterprise's inventory and pricing systems to determine whether the order can be filled, and sends a quote for the requested items to the client

The following figure shows the flow of data in the RequestQuote business process of the Tutorial Process application.



The purpose of the RequestQuote business process is to provide price and availability information for a set of widgets. The flow of the data through the RequestQuote business process is represented by the following steps:

   1. The business process receives the set of widget IDs.
   2. The business process determines the tax rate for the shipment and puts the result in the taxRate float business process variable.
   3. The business process gets the price of each of the requested widgets from a source and places the resulting XML data into the priceQuote business process variable. (This XML data is valid to the XML Schema in the PriceQuote.xsd file.)
   4. The business process gets information about availability for the widgets from another source and places the resulting XML data into the availQuote business process variable. (This XML data is valid to the XML Schema in the AvailQuote.xsd file.)
   5. The business process invokes the Combine Price and Avail Quotes node. The Combine Price and Avail Quotes node calls the myJoin Transformation method stored in the Transformation file called MyTutorialJoin.dtf file. The business process passes the values of the priceQuote, availQuote, and taxRate business process variables to the myJoin method. The myJoin method invokes the query written in the XQuery language and stored in the myJoin.xq file. The query merges all the price, availability, and tax rate information into a single set of XML data and returns the result as the return value of the myJoin method. The data returned from this myJoin method is valid to the XML Schema in the Quote.xsd file. After the myJoin method is invoked, the Combine Price and Avail Quotes node assigns the resulting XML data to the Quote business process variable.

Thiruvasakamani Karnan