Wednesday, July 16, 2008

Interface Mapping

Interface Map How to

Websphere Integration Developer v612

Contact us...

Contents

How to use interface maps to facilitate the wiring between two SCA components

Introduction

How to use interface maps to facilitate the wiring between two SCA components

Related Links
How to make two SCA components with different interfaces talk to one another
  1. The OrderProcessing component has OrderProcessing interface
  2. The ShippingService component expects a ShippingService interface.
How can we get these two SCA components to talk to one another?
Create an Interface Mapping
In the Assembly Diagram,
  1. Wire OrderProcessing component to Shipping Service component

  2. In the Add Wire dialog window that appears (WID detects that the two interfaces are different), select create an interface etc.. and click OK.
An interface map (OrderProcessingToShippingServiceMap) that seats between the OrderProcessing and ShippingService component is created (see below).
Open the Interface Mapping Editor
Double-click OrderProcessingToShippingServiceMap to open the interface mapping editor.
Connect operations
  1. Connect the placeOrder(OrderProcessing) operation to the shipOrder(ShippingService) operation.

  2. Click on the connection you just created between the two interfaces to display the parameters of each interface.
Connect parameters
  1. Connect order(placeOrder) to shipTo(shipOrder) parameter.
  2. Connect orderNumber(shipOrder) to orderNumber(placeOrder) parameter.
Parameter flow
Notice the parameter flow (i.e move). The pointed end points to the direction of the flow. For example, order goes to shipTo.

How to link an import and and export together through an interface map

Related links

Interface map

Interface maps

Interface mapping editor

Mapping interfaces

Interface and Business Object Mapping and Human Tasks (IBM DeveloperWork Guided Tour)

Overview
The import and export must be linked together through an interface map (i.e InboundToOutbound) to allow data to be passed between them.
The export/import were created using the the adapter pattern wizard
Do the following steps to create an interface map:
  1. Create an interface map
  2. Generate an interface map implementation
  3. Add source interface (i.e CustomerIn) to the interface map.
  4. Add target interface (i.e SeparateCustomerOut) to the interface map
  5. Connect interface operations
  6. Connect interface parameters
  7. Wire the components (i.e wire CustomersIn to InboundToOutbound and wire InboundToOutbound to SeparateCustmerout).
Completed interface map
CustomersIn Interface
SeparateCustomerOut Interface
Create an interface map
  1. Click on the Interface Map icon (Palette)
  2. Position the mouse where you want to drop the interface map (click the mouse to drop the interface map)
  3. Rename the interface map as required (i.e InboundToOutbound).
  4. Save your work.
Generate implementation
Right-click on the interface map (i.e InboundToOutbound) and select Generate Implementation.
Select folder
Select default folder and click OK to continue.
Add source interface
Click on the Add source interface icon.
Select source interface
Select a source interface to be added (i.e CustomersIn) and click OK to continue.
Save your work.
Note that some of the error and warning messages have disappeared.
Add target interface
A source interface has been added (i.e CustomersIn).
We now have to add a target interface.
Click on the Add target interface icon to add a target interface.
Select target interface
From the Add target Interface window, select a target interface to be added (i.e SeparateCustomersOut) and click OK to continue.
Save your work.
Note that error and warning messages still exist.
Connect operations to define mapping
A target interface has been added (i.e SeparateCustomersOut).
Connect the source interface operation (i.e emitCustomer) to the target interface operation (i.e create).
Save your work after making the connections.
Connect parameters to define mapping
After connecting the operations, the parameter mapping artifacts appear.
Connect the source interface parameter(i.e emitCustomerInput) to the target interface parameter (i.e createInput).
Save your work after making the connections.


No comments: