IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Oracle E-Business Suite > Overview of IBM WebSphere Adapter for Oracle E-Business Suite > Technical overview > Outbound processing > Outbound operations

Exists operation

The Exists operation determines whether the database contains records that match the attributes set in a business object.

You can use both key and non-key attributes in the selection criteria.

When using the external service wizard to discover table objects in a database, you can select multiple tables and add those tables to the selected objects portion of the Find Objects in the Enterprise System screen. However, you cannot use the external service wizard to link or join the tables that you selected. If the goal of your business application requires the table business object to perform an Exists operation on joined tables, you need to join the tables in the database to create a view of the joined tables. After you have created a view of the joined tables, you can then perform discovery on the view. The Exists operation would be supported on this view.

To process the Exists operation and send the results based on the specified business object attributes, the adapter performs the following actions:

  1. The adapter receives a table business object from the import. This business object can be flat (simple with no child business objects) or hierarchical (complex, containing one, or more child business objects).

    If the business object is hierarchical, it is only for the top-level business object (the individual business object at the top of a hierarchical business object) for which the adapter builds the query.

    The input business object that supports the Exists operation varies depending on the business object type. In addition to being supported by the table business object, the Exists operation is also supported by the views business object and the synonyms and nicknames business object.

  2. The adapter uses the table business object to generate an SQL SELECT statement that it sends to the server.

    The SQL SELECT statement used is as follows:

    select count(*) from TABLENAME where column1=? AND column2=?

    Here is a sample SQL statement for our example:

    select count(*) from CUSTOMER where fname='John' AND lname='Smith'

    In this case, the SQL statement specifies non-primary key attributes fname and lname, with the assigned values of John and Smith.

    The adapter includes the attribute information from the table business object in where clause of the SQL query.

  3. The database server runs the SQL query and sends the results back to the adapter.

  4. The adapter obtains the results of the SQL query from the database server and sets the recordcount and status attributes on the ExistsResults business object.

    For example, if the Exists operation determined there are two records that match the attribute and value settings in the business object, the adapter sets status=true and recordcount=2.

    If a record with the specified attributes is not found, the status output parameter is false and the recordcount output parameter is 0.

    The following screen capture illustrates the structure of the ExistsResult business object returned from an Exists operation.

  5. The adapter returns the ExistsResult business object to the caller.

The following illustration shows how the adapter processes a table business object with an Exists operation.

Outbound operations


Related concepts:

Create operation

Retrieve operation

RetrieveAll operation

Update operation

ApplyChanges operation

Delete operation

Execute operation

Invoke operation

Publish operation


Related reference:

Fault business objects