bea.com | products | dev2dev | support | askBEA |
|
e-docs > WebLogic Platform > WebLogic Integration > DI Topics > DI Plug-In > Using the Data Integration Plug-In |
DI Plug-In |
Using the Data Integration Plug-In
This section provides information about the following topics:
Data Translation with the Data Integration Plug-In
The data integration plug-in provides capabilities for translating nonXML documents into XML, and vice versa, while executing business process management (BPM) functions. To perform such a translation, complete the following procedure:
Figure 2-1 Task Properties Dialog Box
Figure 2-2 Add Action Dialog Box
Translate XML to Binary
To perform an XML-to-binary translation:
Figure 2-3 Translate XML to Binary Dialog Box
Translate Binary to XML
To perform a binary-to-XML translation:
Figure 2-4 Translate Binary to XML Dialog Box
Processing Event Data
The data integration plug-in provides a function that enables binary data to trigger workflows by converting the binary data to XML or by preprocessing it at the front end of event processing. This function is referred to as the event handler. The event handler is executed when JMS messages are published to a topic.
Three JMS properties are required for a message to be preprocessed by the data integration plug-in:
The first two JMS message properties are constant for all messages addressed to the event handler. The third property contains the name of the MFL document that describes the binary data in the message.
Note: The MFL document referenced in the WLPI EventDescriptor must be stored in the repository.
Listing 2-1 is a sample of code used to build a message that can be processed by the event handler.
Listing 2-1 Sample Event Handler Code
byte[] bindata = ... the binary data ...
pub = sess.createPublisher(topic);
BytesMessage msg = sess.createBytesMessage();
msg.writeBytes(bindata);
msg.setStringProperty("WLPIPlugin", "com.bea.wlxt.WLXTPlugin");
msg.setStringProperty("WLPIContentType",
"binary/x-application/wlxt");
msg.setStringProperty("WLPIEventDescriptor", "mymfldoc");
pub.publish(msg);
The servlet sample application shows how the message built by this code is processed by the event handler. See Running the Servlet Sample for information about running the servlet sample.
Enhancing Data Translation Performance
The data integration plug-in provides a configuration panel for monitoring and administering in-memory cache of the MFL document and for enabling or disabling event handler debugging. Using this panel, you can adjust the in-memory cache and translation object pool to enhance the performance of your data translations.
Note: You must clear the MFL document in-memory cache in order for any updates you make to an MFL document to take effect.
To access the configuration panel, follow the steps below. For more information about the actions specific to business process management, refer to the business process management documentation.
Figure 2-5 Plug-In Configuration Dialog Box
Figure 2-6 Configuration Dialog Box for the Data Integration Plug-In
The data integration plug-in extends the capabilities for displaying and editing provided by standard BPM functionality. These capabilities are provided by the Hex Editor component of Format Tester for displaying and editing binary data.
Variable Types and the Data Integration Plug-In
The data integration plug-in provides a BinaryData variable type that you can use to edit and display binary data. The BinaryData variable acts as a container for a logical set of binary data with additional display capabilities. This variable is used by programs that call the actions provided by the data integration plug-in to pass and receive binary data. It is also used by the Workflow Instance Monitor to display and edit the contents of a binary variable.
Custom Data Types and the Data Integration Plug-In
WebLogic Integration provides a user-defined type feature that allows you to create custom data types that accommodate your unique data type requirements. The user-defined type feature allows these custom data types to be plugged in to the data integration run-time engine. Once a user-defined data type is plugged in, it is indistinguishable from a built-in data type, in terms of both features and functionality.
Configuring User-Defined Data Types
User-defined types used by the data integration plug-in are stored in the WebLogic Integration repository as CLASS documents. At run time, the data integration plug-in loads user-defined type classes from the repository as required. In addition, the data integration plug-in exports the MFL and class files required to support the active template, allowing a template to be imported, intact, on another business process management instance. Class documents may be placed in the repository using either of two methods. The following sections describe those methods:
Using the Format Builder
To publish a user-defined type to the repository using the Format Builder, complete the following procedure:
Once a connection to the repository is established, the Add/Remove User Defined Types dialog box displays the status of each registered user-defined type and allows for the publication of each such type to the repository. The status of each user-defined type in the repository is indicated by an icon, in the form of a ball, before each entry in the Installed Types area of the dialog box.
The color of the icon before each name of a user-defined type indicates the status of that type:
Using the Repository Import Utility
To use the repository import utility to import Java class files (including user-defined types), complete the following procedure:
wlxt.repository.url=server_URL
java com.bea.wlxt.repository.Import filename
Note: Any Java class file may be imported into the repository using the repository import utility, as well as User Defined Types. This capability is useful if a user-defined type relies on additional class files that do not extend the com.bea.wlxt.bintype.Bintype class.
Support for WebLogic Server Clustering
The data integration plug-in can operate successfully in a clustered WebLogic Server environment. In a clustered environment, the plug-in administrator is connected to only one node of the cluster at any given time. Any commands issued by the administrator must be propagated to the other nodes in the cluster.
Communication among the various servers in a cluster is handled through a JMS topic. The topic is used for communication to different nodes in a cluster in a WebLogic Integration environment.
Configuring the Data Integration Plug-In for Clustering
If you want to take advantage of the clustering capability, you must configure the data integration plug-in as follows:
com.bea.wlxt.cluster.BroadcastTopic
<EJBComponent Name="wlxt-cluster"
DeploymentOrder="99"
Targets="[server_name]"
URI="wlxtmb.jar"
/>
Note: You must restart the server in order for the change to the config.xml file to be recognized.