![]() |
![]() |
|
|
Advanced Configuration Tasks
This section introduces the advanced features of the B2B integration functionality provided by WebLogic Integration. A roadmap to detailed information about these features is also provided. The section includes the following topics:
Overview of Advanced Features
Logic plug-ins are Java classes that are invoked when WebLogic Integration is started. At run time, they intercept, process, and output business messages. The advanced features associated with logic plug-ins include:
Note: The use of XPath router and filter expressions for routing messages to trading partners is a special feature of the XOCP business protocol.
In addition, the B2B integration functionality provided by WebLogic Integration supports the specification of extended properties for trading partners. These extended properties can be used by:
XPath Expressions in Routing and Filtering
The XPath expressions used by the XOCP router and XOCP filter logic plug-ins to control the flow of business messages fall into three categories:
Note: The use of XPath expressions for routing messages to trading partners is a special feature of the XOCP business protocol. When an application sends a message using RosettaNet or cXML, the target recipient is explicitly encoded.
As described in XOCP Hub and Spoke Delivery Channels, XOCP delivery channels are configured as hub delivery channels or spoke delivery channels. When a business message is transmitted to a hub delivery channel, the XOCP router logic plug-in generates an XML message-context document. The message-context document captures properties associated with the trading partner sender and recipients, as identified by any conversation definition and collaboration protocol agreements. Any defined XPath router expressions use the XPath syntax to select a subset of trading partners from the set of trading partners and associated properties captured in the message-context document. The selected trading partners are the intended recipients of the XOCP business message.
The following figure provides a high-level overview of message processing and routing on an XOCP hub delivery channel.
Figure 3-1 Message Processing in XOCP Hub Delivery Channel
As noted, when an incoming message is received by a hub delivery channel, the conversation definition and any associated collaboration agreements that have been configured are used to identify the recipient trading partners to be included in the message-context document. For example, suppose you have a Query Price and Availability conversation definition (QPA) that defines two roles: buyer and supplier. For trading partner 1 (TP1), a hub delivery channel, tp1-hub-dc, is defined. For each of the other four trading partners (TP2, TP3, TP4, and TP5) a spoke delivery channel is defined: tp2-spoke-dc, tp3-spoke-dc, tp4-spoke-dc, and tp5-spoke-dc. The following collaboration agreements are defined on TP1:
When a business message from TP2 is sent to the supplier role, and it is received on tp1-hub-dc, the collaboration agreement in which tp1-hub-dc is assigned the buyer role is identified. That collaboration agreement is then used to identify the trading partner recipients for the business message.
In this case, the XML message-context document generated by the XOCP router logic plug-in contains identifying information and properties for both the sender (TP1) and the recipients (TP3, TP4, and TP5).
Any XPath router expressions that are defined are used by the XOCP router logic plug-in to select trading partners from this list. The trading partners selected by the XPath expression(s) are then included in the message routing header. Each XPath expression is configured to replace or to be appended to the results of the previous expression. For additional information about how XPath router expressions are processed, see XPath Router Expression Processing.
Note: Although the context attribute of the wlc element in the message-context document is updated, in the course of processing, by the XPath router logic plug-in (from message-router to trading-partner-router, then to hub-router), no other element of the document is changed. In other words, all XPath router expressions are used to select from the set of trading partners that was originally included.
Once the XOCP router logic plug-in finishes processing and messages are routed to the specified trading partners, the XPath filter logic plug-in generates an XML message-context document for each outgoing business message.
If XPath filter expressions are defined, they are evaluated against the message-context document generated by the XOCP filter to determine whether the business message should be sent to a trading partner or not. XPath filter expressions must evaluate to a boolean true or false.
The order in which these XPath filter expressions are evaluated is described in XPath Filter Expression Processing.
As noted in Overview of Advanced Features, XPath router and filter expressions can reference user-defined extended properties. (For a discussion of extended properties for trading partners, see Trading Partner Extended Properties.)
XPath Router Expression Processing
XPath router expressions fall into three categories. Each expression is configured to replace or to be appended to the results of the previous XPath expression. The expressions are processed in the following order:
If you define more than one trading partner XPath router expression or business protocol XPath router expression, all the trading partner XPath router expressions are evaluated before the business protocol XPath router expressions. Expressions of the same type are processed in the order listed in the B2B Console.
XPath Filter Expression Processing
WebLogic Integration supports XPath filter expressions for two entities: trading partners and business protocols. Expressions are evaluated in the following order:
If you define more than one XPath filter expression for a trading partner or a business protocol, all the XPath filter expressions for trading partners are evaluated before those for business protocols. Processing continues until an expression evaluates to false, or until all expressions are processed. Expressions of the same type are processed in the order listed in the B2B Console.
Configuring Router and Filter Expressions
You can configure XPath router and filter expressions for both trading partners and business protocols from the B2B Console. To configure XPath router and filter expressions for a trading partner, complete the following steps:
Figure 3-2 XOCP Filters & Routers Tab
From the XOCP Filters & Routers tab you can configure and order required XPath expressions. The detailed information required to perform these tasks is provided by online help. See Getting Help.
A Filters & Routers tab that is identical to the preceding tab is available when you select the Configuration tab on the XOCP business protocol definition page. Only the context differs for the two pages (the tab available from the XOCP business protocol definition page is used to define filters and routers that apply to all messages, not just those that apply to a particular trading partner).
Additional Information
For more information about routing and filtering business messages, the structure of message-context documents, and creating XPath expressions, see "Routing and Filtering Business Messages" in Programming Logic Plug-Ins for B2B Integration.
Custom Logic Plug-Ins
Logic plug-ins are Java classes that can intercept and process business messages at run time. Each business protocol is associated with three standard logic plug-ins:
The following table describes built-in logic plug-ins.
Table 3-1 Business Protocol Logic Plug-Ins
Custom logic plug-ins can be developed and added to either a router or a filter processing chain for a business protocol. Inclusion in such a processing chain, however, does not necessarily limit the functionality of a logic plug-in. Although custom logic plug-ins are associated with one of these two types of processing chain, they are not required to perform routing or filtering services. Thus, for example, a custom logic plug-in might be developed to examine message content and capture information for billing purposes.
Configuring Logic Plug-Ins
After you develop a custom logic plug-in, you must add a definition for it to a business protocol definition router or filter chain. To do so, open the WebLogic Integration B2B Console and complete the following procedure:
To create a logic plug-in definition:
Step 2 is performed from the business protocol page, as described in the following section.
Adding a Custom Logic Plug-In to a Business Protocol Router or Filter Chain
To add a logic plug-in to a business protocol router or filter processing chain:
Figure 3-3 Filters & Routers Tab for Business Protocols
From the Filters & Routers tab you can select and order any required logic plug-ins that are available. The detailed information required to perform these tasks is provided by online help. See Getting Help.
Additional Information
For more information about the logic plug-in API, and for guidelines for developing and deploying custom logic plug-ins, see Programming Logic Plug-Ins for B2B Integration.
Trading Partner Extended Properties
The default properties associated with a trading partner can be augmented to support application-specific requirements through the use of trading partner extended properties. You can add extended properties from the B2B Console. Once added, these properties are included in any message-context documents generated by the business protocol router and filter logic plug-ins as uniquely named extended property sets.
Extended property sets are modeled in the repository so they can be retrieved as subtrees within an XML document. These XML subtrees appear in the message-context XML document generated by the built-in router and filter logic-plug-ins. XPath expressions can reference these extended properties. The root elements of each extended property set associated with a given trading partner are inserted as the last children of the <trading-partner> element node. The following example shows an XML document generated from the repository with an extended property set:
<wlc context="message-router">
...
<trading-partner name="ABC International"
email="admin@abc.com"
phone="+1 123 456 7890">
<address>123 ABC Street., Anytown, CA 95131</address>
<extended-property-set name="ABC Contact">
<business-contact>Joe Smith</business-contact>
<phone type="work">+1 123 456 7654</phone>
<phone type="cell">+1 321 654 4567</phone>
<city>Anytown</city>
<state>California</state>
</extended-property-set>
</trading-partner>
...
</wlc>
Configuring Trading Partner Extended Properties
To add extended properties to a trading partner:
Figure 3-4 Trading Partner Extended Properties Tab
Using this tab you can set the required extended properties. The detailed information required to perform these tasks is provided by online help. See Getting Help.
Additional Information
For more information about the structure of message-context documents and creating XPath expressions to reference extended properties, see Programming Logic Plug-Ins for B2B Integration.
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|