Using lookups

Lookups provide a means to map a value used in one system to how that value is presented in another. For example, our flight data may refer to BA, but if we wanted to incorporate the details into an e-mail, we may want to refer to British Airways. Sometimes, these lookups are referred to as Domain Value Mappings (as the mapping is from one  the value represented in one domain or application to another); this is something of a hangover from one of Oracle's other integration products (SOA Suite and Service Bus). The lookup scenario we will be implementing can be shown as follows:

Using lookups

As with the previous enrichment integration, we are going to shortcut the development process by using the Clone option, but this time cloning integration FlightStatusEnquiry_Ch6_1. Complete the clone dialog with the following details:

Property

Description

Integration name

FlightStatusEnquiry_Ch6_2

Identifier

This will be proposed based on the integration name and there is no need to change it unless you would like an alternate name.

Version

01.00.0000

Package Name

ics.book.ch6

Description

This integration extends FlightStatusEnquiry_Ch6_1 to use lookups. It will take the request and communicate to a backend system, returning the fully filled out response

Creating a lookup

Before we can use a lookup, we first need to create a lookup to use. Navigate to the Lookups part of the Designer, and you will see a screen like this:

Creating a lookup

Select the Create New Lookup button, which will launch a dialog, as shown here:

Creating a lookup

We can complete this form with the following information:

Property

Value

Lookup Name

AirlineCodesNameCallsign_Ch6

Description

Maps the IATA, ICAO, name, and flight call sign names

Complete the form by pressing the Create button. Now we are presented with a screen that is used for building out a table of values. Use the following screenshot to help populate the table for us to use. The plus symbol at the top of the right-hand columns will add the columns needed, and the plus symbol at the bottom of the table will add rows as you can see here:

Creating a lookup

With the data setup, we need to link to each column an adapter or a name space. When using a name space, you would typically use the name space used by the system related to the column. For this example, we are just going to concentrate on adapters. The adapter can then be used to index against that column for its key values. For our example we want to link the adapters as follows:

Adapter Type

Column

SOAP

1

File

2

REST

3

FTP

4

These adapter mappings may seem counter-intuitive, but when we apply the lookup, you will see how the adapter is being applied. With the adapters allocated we can save the lookup using the top Save button, and Exit Lookup to start incorporating the lookup in the integration.

Alternate lookup creation

It is also possible to create a lookup by importing a CSV file. This is done by clicking on the Import button on the colored banner which will launch a standard file selection dialog. When you click the Import button on the dialog then import process will start. For this to work the CSV file needs two lines providing information before the data. This looks like the following:

  • Line 1
  • Fixed value of DVM
  • Lookup name, for example, FlightData
  • Lookup description within double quotes, for example, Aircraft information
  • Line 2; each cell has the name of the data in that column
  • Line 3; the first row of data values

Within the resources we have provided an example file called AircraftData_Ch6.csv which you can use to see the structure and try the import process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset