Sunday, May 10, 2009

Adding Associations to BDC using Enteprise Enabler’s BDC Tool

Associations are used to create relationship between Entities in LOB application.

StoneBond’s BDC Tool allows users to easily create Association between mutliple tables in any database (Not limited to SQL and Oracle).

Following Steps are used to create simple association between Customers and Orders Entities of Northwind Database.

  1. Open Enterprise Enabler studio and create source templates for Customers and Orders Table.
  2. Create surrogate destination templates for these two source entities.
  3. Create two maps between source and destination templates.
  4. Open BDC Tool from Tools–>BDC Tool.
  5. Enter required information to create Application Definition File.
  6. Create a new Entity named Customers and select the map that is created for Customers Table. Select CustomerId as the Identifier in the Entity.
  7. Once the Entity is created, methods for each method instance (Finder, SpecifiFinder and IdEnumerator) will be added to methods list.
  8. Add another entity named Orders and select the map that is created for Orders Table. Select OrderId and CustomerId’s as identifiers in Orders entity.
  9. Three methods will be automatically added to it… 
  10. Create a new method named GetOrdersByCustomerId and click on Add New parameter.
  11. Select the CustomerID column from the Customers Entity to create a relation ship.
  12. Once the Identifier from different entity is selected, it will be considered as a new association. 
  13. Fill up required information for adding association and click on ok button.
  14. Click on Generate button to create Application Definition File.