< Previous | Next >

Creating the generic to specific business object maps

In this section, we will create business object maps between the generic and specific business objects. Business object maps between source and target business objects are used to assign values to the target business objects based on the values in the source business objects.

The prerequisite projects that are imported contain the business objects that we will use to create these business object maps. The business objects used by the generic are in the library eMergedLibrary, and the business objects used by the specific BankInterface are in the BankModule.

Creating the GenericCustomerToSpecificCustomer business object map

Follow these steps to create the GenericCustomerToSpecificCustomer business object map.
  1. In the Business Integration perspective, select BankModule. Right-click, and select New > Business Object Map.
  2. In the Folder field, type com.emerged.bank.
  3. In the Name field, type GenericCustomerToSpecificCustomer. Click Next.
  4. Select the input and output business objects. In the input list, select CustomerBO from eMergedLibrary, by selecting the check box next to CustomerBO http://eMergedLibrary/com/emerged/portal. In the output list, select CustomerBO from BankModule, by selecting the check box next to CustomerBO http://BankModule/com/emerged/bank. Click Finish.
    GenericToSpecific business object map input and output
    The business object mapping editor opens, showing the source customerBO on the left, and the target customerBO on the right.
  5. In the business object mapping editor, add a connection between the customerNumber attributes of the source and target business objects. Click the source business object's customerNumber attribute, grab the wire handle, and connect it to the target object's customerNumber attribute.
    Adding a connection between the customerNumber attributes
  6. Add connections to the remaining attributes to complete the business object map, as shown below.
    GenericCustomerToSpecificCustomer business object map

Creating the SpecificCustomerToGenericCustomer business object map

The SpecificCustomerToGenericCustomer business object map has the specific bank's CustomerBO as the source business object and the generic bank's CustomerBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the SpecificCustomerToGenericCustomer specifying these business objects:
  • CustomerBO from http://BankModule/com/emerged/bank as the input business object
  • CustomerBO from http://eMergedLibrary/com/emerged/portal as the output business object.
In the business object mapping editor, follow these steps to connect the source attributes on the left to the target attributes on the right.
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the GenericCustomerToSpecificContactInfo business object map, as shown below. SpecificCustomerToGenericCustomer business object map
  2. Add a connection between customerNumber and dataValid. By default, the transform type is Move.
  3. We want to add logic to arrive at the value of dataValid based on the value of customerNumber. Change the transform type to Custom. Right-click 13 Move and selectChange Transform Type > Custom.
    Change transform type
  4. Switch to the Properties view, click on the Details tab to add the custom code as a visual snippet..
  5. In the Visual snippet editor, click the Expression icon on the palette Expression icon in Visual snippet editor palette, and click the canvas.
  6. In the expression, type CustomerBO_customerNumber!=null
  7. Add another expression, and type CustomerBO_1_dataValid
  8. Connect the exit terminal of the CustomerBO_customerNumber!=null expression to the CustomerBO_1_dataValid expression, as shown below:
    Custom code in the Visual Snippet editor
  9. From the menu, select File > Save (or press Ctrl+S).

Creating the GenericCustomerToSpecificContactInfo business object map

The GenericCustomerToSpecificContactInfo business object map has the generic bank's CustomerBO as the source business object and the specific bank's ContactInfoBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the GenericCustomerToSpecificContactInfo map, specifying these business objects:
  • CustomerBO from http://eMergedLibrary/com/emerged/portal as the input business object
  • ContactInfoBO from http://BankModule/com/emerged/bank as the output business object.
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the GenericCustomerToSpecificContactInfo business object map, as shown below. GenericCustomerToSpecificContactInfo business object map

Creating the SpecificContactInfoToGenericTrueOrFalse business object map

The SpecificContactInfoToGenericTrueOrFalse business object map has the speficic bank's ContactInfoBO as the source business object and the generic bank's TrueOrFalseBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the SpecificContactInfoToGenericTrueOrFalse map, specifying these business objects:
  • ContactInfoBO from http://BankModule/com/emerged/bank as the input business object
  • TrueOrFalseBO from http://eMergedLibrary/com/emerged/portal as the output business object.
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the SpecificContactInfoToGenericTrueOrFalse business object map, as shown below. SpecificContactInfoToGenericTrueOrFalse business object map
  2. In the details properties view, add the code for the custom transform.
  3. Add an expression to the canvas. Type ContactInfoBO_customerNumber!=null
  4. Add another expression to the canvas. Type TrueOrFalseBO_value.
  5. Connect the exit terminal of the ContactInfoBO_customerNumber!=null expression. to the TrueOrFalseBO_value expression.

Creating the GenericBankAccountToSpecificAccount business object map

The GenericBankAccountToSpecificAccount business object map has the generic bank's BankAccountBO as the source business object and the specific bank's AccountBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the GenericBankAccountToSpecificAccount map, specifying these business objects:
  • BankAccountBO from http://eMergedLibrary/com/emerged/portal as the input business object
  • AccountBO from http://BankModule/com/emerged/bank as the output business object.
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the GenericBankAccountToSpecificAccount business object map, as shown below. GenericBankAccountToSpecificAccount business object map

Creating the SpecificAccountToGenericBankAccount business object map

The SpecificAccountToGenericBankAccount business object map has the specific bank's AccountBO as the source business object and the generic bank's BankAccountBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create theSpecificAccountToGenericBankAccount map, specifying these business objects:
  • AccountBO from http://BankModule/com/emerged/bank as the input business object.
  • BankAccountBO from http://eMergedLibrary/com/emerged/portal as the output business object
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete theSpecificAccountToGenericBankAccount business object map, as shown below. SpecificAccountToGenericBankAccount business object map
  2. In the details properties view, add the code for the custom transform.
  3. Add an expression to the canvas. Type AccountBO_accountNumber!=null
  4. Add another expression to the canvas. Type BankAccountBO_dataValid.
  5. Connect the exit terminal of the AccountBO_accountNumber!=null expression. to the BankAccountBO_dataValid expression.

Creating the SpecificAccountListToGenericBankAccountList business map

The SpecificAccountListToGenericBankAccountList business object map has the specific bank's AccountListBO as the source business object and the generic bank's BankAccountListBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the SpecificAccountListToGenericBankAccountList map, specifying these business objects:
  • AccountListBO from http://BankModule/com/emerged/bank as the input business object.
  • BankAccountListBO from http://eMergedLibrary/com/emerged/portal as the output business object
In the business object mapping editor, map the source attributes on the left to the target attributes on the right
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the SpecificAccountListToGenericBankAccountList business object map, as shown below. SpecificAccountListToGenericBankAccountList business object map
  2. Click Submap. In the properties details view, select SpecificAccountToGenericBankAccount from the business object map list.

Creating the SpecificAccountToGenericTrueOrFalse business object map

The SpecificAccountToGenericTrueOrFalse business object map has the specific bank's AccountBO as the source business object and the generic bank's TrueOrFalseBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the SpecificAccountToGenericTrueOrFalse map, specifying these business objects:
  • AccountBO from http://BankModule/com/emerged/bank as the input business object.
  • TrueOrFalseBO from http://eMergedLibrary/com/emerged/portal as the output business object
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the SpecificAccountToGenericTrueOrFalse business object map, as shown below. SpecificAccountToGenericTrueOrFalse business object map
  2. In the details properties view, add the code for the custom transform.
  3. Add an expression to the canvas. Type AccountBO_accountNumber!=null
  4. Add another expression to the canvas. Type TrueOrFalseBO_value.
  5. Connect the exit terminal of the AccountBO_accountNumber!=null expression. to the TrueOrFalseBO_value expression.

Creating the SpecificAccountToGenericCashAmount business object map

The SpecificAccountToGenericCashAmount business object map has the specific bank's AccountBO as the source business object and the generic bank's CashAmountBO as the target business object. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, create the SpecificAccountToGenericCashAmount map, specifying these business objects:
  • AccountBO from http://BankModule/com/emerged/bank as the input business object.
  • CashAmountBO from http://eMergedLibrary/com/emerged/portal as the output business object
In the business object mapping editor, map the source attributes on the left to the target attributes on the right.
  1. Following the steps used to create the GenericCustomerToSpecificCustomer business object map, add connections to the attributes of the input and output business objects to complete the SpecificAccountToGenericCashAmount business object map, as shown below. SpecificAccountListToGenericCashAmount business object map
  2. In the details properties view, add the code for the custom transform.
  3. Add an expression to the canvas. Type AccountBO_accountNumber!=null
  4. Add another expression to the canvas. Type CashAmountBO_dataValid.
  5. Connect the exit terminal of the AccountBO_accountNumber!=null expression. to the CashAmountBO_dataValid expression.

Feedback
(C) Copyright IBM Corporation 2005, 2006. All Rights Reserved.
< Previous | Next >