Handling the Exist verb

When the business object handler obtains an Exist verb from the request business object, it must determine whether an application entity, whose type is indicated by the business object definition, exists. This operation enables an integration broker to verify that an entity exists before the integration broker performs an operation on the entity. As an example, assume that a customer site wants to synchronize Order, Customer, and Item entities in the source and destination applications. Before synchronizing an order, the user wants to ensure that the customer entity referenced by the Order business object already exists in the destination application database. In addition, the user wants to ensure that each Item entity referenced by the OrderLineItem child business objects also exists in the destination application.

Note:
For a table-based application, the Exist method checks for the existence of an entity in an application database, usually checking for a row in a database table.

The user can configure the integration broker to call the connector with a Customer business object that has the Exist verb and the primary keys set. In this way, the integration broker can verify that the customer already exists in the application. Similarly, the user can configure the integration broker to call the connector with referenced Item business objects that have the Exist verb and primary keys set. The user might decide to halt the synchronization of the Order if the verification of the existence of the application entities fails.

This section provides the following information to help implement an Exist verb:

Note:
You can modularize your business object handler so that each supported verb is handled in a separate C++ method. If you follow this structure, an Exist method handles processing for the Exist verb.

Standard processing for an Exist verb

The standard behavior of the Exist method is to query the application database for the existence of a top-level business object.

Outcome status for Exist verb processing

The Exist operation should return one of the outcome-status values shown in Table 36.

Table 36. Possible outcome status for C++ Exist verb processing
Exist condition C++ outcome status
If the application entity exists, the Exist operation returns "Success". BON_SUCCESS
If the Exist operation is unsuccessful in retrieving the top-level object, it:
  • fills a return-status descriptor with additional information about the cause of the "exist" error
  • returns a "Fail" outcome status
BON_FAIL

Copyright IBM Corp. 1997, 2003