Handling the Exists verb

When the business object handler obtains an Exists 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 Exists 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 Exists 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 Exists 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 Exists verb:

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

Standard processing for an Exists verb

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

Outcome status for Exists verb processing

The Exists operation should return one of the outcome-status values shown in Table 42..

Table 42. Possible outcome status for Java Exists verb processing

Exists condition Java outcome status
If the application entity exists, the Exists operation returns "Success". SUCCEED
If the Exists operation is unsuccessful in retrieving the top-level object, it:
  • fills a return-status descriptor
  • returns a "Fail" outcome status
FAIL

Copyright IBM Corp. 1997, 2003