Context for the scenario to enrich a message with data from a database

This scenario shows how you can enhance a message in IBM® App Connect Enterprise by using a message map. In this scenario, the data is available in an external database system. The data is stored across multiple database tables, all of which are located within the same database schema.

Your company has implemented an AddressBook service that is used by different departments in different countries in your organization. This service allows your employees to obtain a client's mail address or to save a new client's mail address.

This figure shows the AddressBook service being used by three departments.

The company uses IBM App Connect Enterprise to develop and manage a number of integration solutions that transform and communicate data between source and target systems. In order to make the service reusable by multiple applications, you design an application responsible for the transformation of the different address formats between the requesting application and the AddressBook service. The AddressBook service is a SOAP-based service that stores a new address or returns an address to the user. You use a message map to define how to transform the SOAP message based on the operation that your user requests.

The company uses DB2® as the external database system that hosts client's details and addresses. For information about supported databases, see IBM App Connect Enterprise Requirements

The scenario uses the following database tables:
  • Person: This table contains an entry per client. The client ID element is used to link information for this client across all tables in the database. The database automatically assigns the ID value when a new record is created. This table contains all clients from all countries.
  • Address: This table contains an entry per client with the address details.
  • Phone: This table contains an entry per client with the phone details.
In IBM App Connect Enterprise, you have the following choices to implement a message flow that connects to a database, and retrieves information to enrich the message:
  • You can use a Mapping node to graphically connect to a database and retrieve data to use in the node and later on in the message flow.
  • You can use a Database node in a message flow to connect to a database and retrieve data that you can use later on in the message flow.
  • You can program a Compute node, JavaCompute node, or .NETCompute node to connect to a database and retrieve data to use in the message flow.

This scenario demonstrates how to use a Mapping node to connect to a database, retrieve data from multiple tables, and graphically populate elements in a SOAP message with this information in the IBM App Connect Enterprise Toolkit.