Chapter 22. Object Discovery Agent 391
Figure 22-13 on page 390 lists the attributes that the ODA generates.
Figure 22-14 Apartment business object
The application-specific information is correct in that the attribute names of the
application object have been generated correctly. Key fields and mandatory
fields are reported. However, you need to check whether this information is
correct. The ApartmentId is not a primary key of this object. More likely it is a
foreign key. Moreover, the tenant business object has been discovered as a flat
object with no relationships to the other object. This information is not accurate,
because the tenant application object is a parent object which contains
apartment and possibly maintenance child objects. The application-specific
information about the EMail attribute is also incorrect. You will update all of these
as you continue.
392 WebSphere Business Integration Adapters
Figure 22-14 on page 391 shows that the apartment business object appears to
be an accurate representation of the application object. It is a flat object with the
ID as a key, mandatory attribute.
Figure 22-15 Maintenance business object
Figure 22-15 shows the following errors that need correcting:
The maintenance business object also has multiple keys flagged, which is not
the case.
The generated business object has an attribute of StatusDescription, but from
our discussions with the application experts, we also know that this business
object should have an attribute of Status as well.
The ODA has interpreted the dates as string data when in fact they are dates.
Figure 22-16 Correct apartment business object
Chapter 22. Object Discovery Agent 393
To modify the generated business objects to reflect accurately the application
view of the objects, complete these steps:
1. The apartment business object in Figure 22-16 on page 392 is correct as
discovered. Save this business object.
Figure 22-17 Correct maintenance business object
2. Modify the maintenance business object to reflect that it contains foreign key
values and column values that are contained in other business objects.
3. The application-specific information chfk reflects that the value for the
attribute of this child object is to be obtained from an attribute contained in the
parent object.
Note: When you save each of the business objects, save a copy of the
business object to a repository file. The schema files generated will be
needed later for import to the Message Broker and for connector start up.
394 WebSphere Business Integration Adapters
Figure 22-17 on page 393 shows the following values:
ApartmentId comes from the ApartmentId attribute of the RM_Tenant
object.
TenantId comes from the Id attribute of the RM_tenant object.
When our adapter is performing a retrieve operation for all of the maintenance
records for a particular tenant, these values are passed to the application for
the search.
Figure 22-18 Correct tenant business object
4. Modify the maintenance business object to add the application-specific
information to these attributes as shown in Figure 22-17 on page 393.
Chapter 22. Object Discovery Agent 395
Figure 22-19 Tenant business object
5. Modify the business object to reflect that the ApartmentId and TenantId are
foreign keys.
6. Remove the key value flags.
7. Change the type for the date fields from String to Date.
8. Inset an attribute of Status with a type of String above the TenantId and
application-specific information of attr=Status.
9. Save the business object.
10.Re-open the RM_Tenant business object.
The tenant business object is a parent object of one apartment and 0 - n
maintenance objects. We need to reflect this.

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.