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

RetrieveAll operation

The adapter uses the RetrieveAll operation to retrieve an array of business objects from the database. The adapter uses different processes depending on whether the RetrieveAll operation is for database table business objects or for user-specified SQL business objects.


For database table business objects

All of the key and non-key attributes populated in the incoming business object determine the selection criteria for the retrieval. The adapter can retrieve multiple rows for the top-level business object from the database, depending on the attributes selected. All values specified in the top-level business object are used. The settings in the child business object are ignored. If no attributes are populated in the incoming business object, all the rows are retrieved from the respective table in the database.

The name of a generated business object matches the name of the table in the database.

For example, the Customer table in the database is represented as a business object named "Customer".

To retrieve an array of business objects, the adapter performs the following actions:

  1. Constructs a container business object for all of the retrieved rows. The name of the container business object is the name of the business object with the string "Container" appended to it.

  2. If the module is configured to use business graphs, which are optional, then it constructs a top-level business graph for each of the retrieved rows. The name of the business graph is the business object name with the string "BG" appended to it.
  3. Retrieves each of the business graphs in the container using the Retrieve operation.

The following figures show the structure of objects returned from a RetrieveAll operation, with and without business graphs.

Figure 1. Structure of the business object returned in a RetrieveAll operation without optional business graphs

Figure 2. Structure of the business object returned in a RetrieveAll operation with optional business graphs

The following errors can result from a RetrieveAll operation:


For query business objects

Business objects that are created for user-specified SELECT statements (query business objects) also support the RetrieveAll operation. The external service wizard generates the query business object by running the user-specified SQL SELECT statement and creating a hierarchy of query business objects.

If you are using optional business graphs, the hierarchy will be as shown in Figure 3.

Figure 3. User-specified query business objects (with optional business graphs)

If you are not using optional business graphs, the hierarchy will be as shown in Figure 4.

Figure 4. User-specified query business objects (without optional business graphs)

To process the query business object generated by the external service wizard for the user-specified SELECT statement, the adapter performs the following actions:

  1. Obtains the SELECT SQL statement from the query business object.
  2. Determines whether a dynamic WHERE clause is specified in the query business object.

    • If there is a dynamic WHERE clause, the adapter replaces the default WHERE clause in the SELECT statement with the dynamic one.

    • If there is no dynamic WHERE clause, the adapter replaces parameters in the SELECT statement with the corresponding values specified in the query business object.

  3. Runs the SELECT statement.
  4. Obtains the result set that is returned and populates the query business object values with the data returned from the database, creating a container business object with the structure shown in Figure 3.
  5. Retrieves the entire hierarchy (a deep retrieve) of each top-level query business object in the container, if any child business objects are defined for the query business objects.

    A query business object can be a top-level business object only. A query business object cannot have child query business objects.


Retrieving NULL objects

The adapter can retrieve records from a database table when the column value is NULL.

For example, a Customer business object might have these columns: custid, ccode, fname, and lname, where ccode need not be a primary key. You can query all the Customer records for which the ccode column is NULL. The adapter generates a select query for the RetrieveAll operation as:

select custid, ccode, fname, lname from customer where custid=? and ccode is NULL

Outbound operations


Related concepts:

Create operation

Retrieve operation

Update operation

ApplyChanges operation

Delete operation

Execute operation

Exists operation

Invoke operation

Publish operation


Related reference:

Fault business objects