bea.com | products | dev2dev | support | askBEA

Download Docs | Site Map | Glossary
Search

Introducing WebLogic Integration

Data Integration

Heterogeneous environments are now commonplace in modern enterprises. These environments are home to heterogeneous applications, each with its own data format. This variety of data formats can make it difficult to integrate data across business systems. Before different systems can understand the data they receive, the data must be translated or transformed into the appropriate format. To facilitate the integration of data across different systems, businesses are adopting XML as the standard format for information exchange.

The adoption of XML as a standard format for data exchange greatly simplifies both intra- and inter-enterprise integration. Within an enterprise, various data formats can be translated into XML, and then seamlessly exchanged with other applications. XML documents can be further transformed into other XML grammars, and then exchanged efficiently over the Internet between trading partners.

WebLogic Integration provides support for the translation of legacy data into XML, and the transformation of XML documents into other XML grammars. The following sections describe the data integration functionality WebLogic Integration provides:

- Data Translation

- Data Transformation

Data Translation

To support the integration of data from diverse enterprise applications, WebLogic Integration enables the translation of binary data to XML, and vice versa. When binary data is translated to XML, structured binary data is converted into an XML document so that the data can be accessed using standard XML parsing methods.

Figure 5-1 Translating Binary Data into XML

To translate binary data, developers first create a metadata description of the record layout in the binary data. The metadata includes descriptions of the fields in the records, including field types (such as string or floating point) and field names. The metadata is stored in a Message Format Language (MFL) file. At run time, the MFL document is used to translate binary data into an XML document, and vice versa.

To create MFL files, integration specialists use the Format Builder tool provided by WebLogic Integration. Integration specialists can also use the Format Builder to produce a DTD file or XML schema that describes the XML document created from the translation.

Figure 5-2 Format Builder

To perform the translation, applications can invoke the translation functionality programmatically, or business processes can invoke the functionality from within their workflows. The resulting XML documents can be used directly in XML-enabled applications or to start other business processes. They can also be transformed into other XML grammars.

Integration with Business Processes

WebLogic Integration provides a plug-in framework that enables the integration of data translation with business processes. To integrate data translation functionality with business processes, integration specialists can use two workflow actions:

- Translate Binary to XML

- Translate XML to Binary

Each action is used to specify an MFL file that contains a metadata description of the binary data, and the location of the source or target data, whether binary or XML.

To use these actions for data translation, integration specialists define a business process using the WebLogic Integration Studio, specifying one of the data translation actions in a workflow node. At run time, the specified action is executed, translating the data into the appropriate format.

Triggering Business Processes Using Binary Data

Business processes are triggered by the receipt of an XML document. WebLogic Integration provides a data translation plug-in that enables binary data to trigger business processes by translating the binary data into XML. The functionality in the plug-in is called the event handler.

The publication of a JMS message to an internal JMS queue invokes the event handler. The event handler causes the binary data in the JMS message to be translated into an XML document. The XML document can then be used to trigger a business process.

The use of the event handler is demonstrated in the Servlet sample application supplied with WebLogic Integration. For details about the Servlet sample, see the following section.

Samples

WebLogic Integration provides three samples that illustrate the integration of the data translation functionality with business processes, and the use of the Format Builder to create message format definitions.

Servlet Applicaton

The Servlet application installs a servlet that uses the binary data event handler to convert binary data to XML. The servlet can be accessed through a Web browser. The servlet accepts requests for the conversion of binary data to XML, and responds by displaying the generated XML data. In addition, the servlet posts the XML data to an internal JMS queue that can be used to trigger a business process.

EJB Application

This EJB application simulates a business process in which data flows from a human resources system to a payroll system. In the process, data flows in the following sequence:

1. The business process is initiated manually when an end user enters payroll data.

2. Using the payroll data, the process obtains employee data from a legacy payroll system that uses binary data.

3. The binary data is translated to XML so that salary information for the employee can be calculated.

4. The result of the calculation is translated back to binary format. It is then sent back to the payroll system for further processing.

Purchase Order

The Purchase Order sample demonstrates how to create DTD and MFL files using the Format Builder. The sample consists of DTD, MFL, and data files that contain binary data. Developers can use the data files as input to the Format Builder to develop their own DTD and MFL files. They can use the DTD and MFL files supplied with the sample to verify that the files they create are correct.

Data Transformation

Once binary data is translated into an XML document, a business can transform an XML document into a specific XML grammar, such as RosettaNet or ebXML. The process of transforming an XML document into another XML grammar or display format is called XML transformation.

XSLT is a specialized XML language that defines rules for translating an XML document into another XML or nonXML document. An XSL stylesheet specifies which elements in an XML document are to be transformed, and how they are to be transformed. The stylesheet maps elements in a source XML document to elements in a target XML document with a different XML grammar.

Figure 5-3 XML Transformation

To transform an XML document, integration specialists first create an XSL stylesheet that describes how one XML grammar is mapped to another XML grammar. Integration specialists can create the XSL stylesheet manually, using the design-time GUI provided by Contivo Analyst, or they can use the auto-mapping functionality in Contivo Analyst and Contivo eService.

Figure 5-4 Contivo Analyst Mapping Editor

To create the XSL stylesheet, integration specialists first need to specify the DTD or XML schema for the source and target XML documents. They can retrieve the DTD and schema files from the WebLogic Integration repository using Contivo Analyst. Once they create the XSL stylesheet, they can store it in the WebLogic Integration repository.

The actual transformation is performed at run-time by the XSL transformation engine bundled with WebLogic Server. Integration specialists define when the transformation is to occur in a business process developed using the business process management functionality provided by WebLogic Integration.

Integration with Business Processes

WebLogic Integration provides an XSL Transform action to integrate data transformation with business processes. To integrate data transformation functionality with business processes, integration specialists define a business process using the WebLogic Integration Studio, specifying the XSL Transform action in a workflow node.

At run time, the XSL Transform action defined in the business process invokes the transformation engine bundled with WebLogic Server. The transformation engine uses the XSL stylesheet sheet stored in the WebLogic Integration repository to map elements from the source XML document to the target document. The resulting XML document can be used to complete a business process, it can be sent for further processing to a trading partner, or it can be used in other XML-enabled applications.