240 Implementing and Administering WebSphere Business Integration Server V4.2.2
In Figure 7-39 on page 241, we can see the result of applying the map to our
input data.
Figure 7-38 Finished testing maps
Save both business objects to a file, because we will use them during the testing
of the map that maps the response back into the generic business object.
7.4.3 From ASBO JDBC_ORDERS to GBO Order
This section discusses the development of the main and submap to transform
the JDBC ASBO to the generic business object Order. Figure 7-39 on page 241
shows these maps within the overall solution.
Chapter 7. Sales order management in InterChange Server 241
Figure 7-39 Mapping the business object JDBC_Orders to Order
Sub_JDBC_ITEMS_to_OrderLineItem
This submap maps the information contained in the application-specific object
JDBC_ITEMS to the generic object OrderLineItem.
To create the map, use the following:
Source business object JDBC_ITEMS
Destination business object OrderLineItem
Map name Sub_JDBC_ITEMS_to_OrderLineItem
Mapping direction Application-Specific to Generic
The map specification is shown in Table 7-7.
Table 7-7 Mapping in Sub_JDBC_ITEMS_to_CWOrderLineItem
SalesOrder
Processing
MQWF_
OrderForm_
to_Order
Order_to_
MQWF_
OrderForm
Order_to_
JDBC_
Orders
JDBC_
Orders_
to_Order
Order
Generic
business
object
From
To
Mapping Mapping
Application specific
business objects
Application specific
business objects
JDBC connector
MQWorkflow connector
MQWF_Order_Form
Input
MQWF_Order_
Form_Input
MQWF_Order_Form
Output
MQWF_Order_
Form_Output
JDBC_ORDERS
JDBC_ITEMS
JDBC_ORDERS
JDBC_ITEMS
Detail_to_
LineItem
LineItem_
To_Detail
ITEMS_to_
LineItem
LineItem_
To_ITEMS
Source Destination
Verb Verb
PARTCODE ItemId
QUANTITY QtyRequired
Original GBO before request OrderLineNote
242 Implementing and Administering WebSphere Business Integration Server V4.2.2
The OrderLineNote attribute was not sent to the connector but we must keep its
value after call to the connector. This attribute is not mapped to any attribute in
the JDBC_ITEMS. To keep the information contained in this attribute, we
implement custom rules again. Select the Custom map rule for the
OrderLineItem attribute without dragging any source attribute to it.
Example 7-3 Passing information from a calling GBO to the response GBO
{
BusObj myInitialCtx = cwMapCtx.getOriginalRequestBO();
Object srcValue = myInitialCtx.get(“OrderLineNote”);
ObjOrderLineItem.setWithCreate(“OrderLineNote”, srcValue);
}
Figure 7-40 shows the Map Designer after all mapping has been done.
Figure 7-40 Completed map
JDBC_ORDERS_to_Order
This map maps the information that is contained in the application-specific object
JDBC_ORDERS to the generic object Order. This map uses the submap
Sub_JDBC_ITEMS_to_OrderLineItem that was created before.
Chapter 7. Sales order management in InterChange Server 243
To create the map, use the following:
Source business object JDBC_ORDERS
Destination business object Order
Map name JDBC_ORDERS_to_Order
Mapping direction Application-Specific to Generic
The maps can be seen in Table 7-6 on page 235.
Table 7-8 Mapping in CWOrder_to_JDBC_ORDERS
Some attributes are not sent to the connector, but we must keep their value after
doing the call. One is the OrderDate attribute. This attribute is not mapped to any
attribute in the JDBC_ORDERS or JDBC_ITEMS. To do this, we implement
custom rules again.
This custom rule should be used for the following attributes:
򐂰 OrderDate
򐂰 Notes
򐂰 PONumber
򐂰 PODate
򐂰 OrderType
For each of these attributes we have similar Java code. Figure 7-41 on page 244
shows the Java code associated with the OrderDate attribute.
Source Destination
Verb Verb
ORDERNUMBER OrderNumber
CUSTOMERID CustomerId
STATUS OrderStatus
ITEMS OrderLineItem
244 Implementing and Administering WebSphere Business Integration Server V4.2.2
Figure 7-41 Java code to keep values after an external call
Figure 7-42 shows the Map Designer after all mapping has been completed.
Figure 7-42 Map the attributes

Get Implementing and Administering WebSphere Business Integration Server V4.2.2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.