beautypg.com

Inbound event notification – IBM WebSphere Adapters User Manual

Page 85

background image

Note:

The RetrieveAll operation always returns a result set regardless of how

many (if any) matches are found.

Processing overview

RetrieveAll processing is as follows:

RetrieveAll should make the adapter ready to return multiple objects. For each of
the objects that will be returned, the

″getNext()″ method will be called. Each call to

″getNext″ should advance the cursor to the next top-level record.

Note:

Adapters should check the property MaxRecords in the WBIInteractionSpec

instance to determine the maximum number of records to return in order to avoid
out-of-memory issues.

Operation return value

The adapter performs a query and retrieves a result set of all objects that match a
given set of values. The output object is a container that holds an 0..n objects of the
same type as the input object.

Error handling

RecordNotFoundException

is thrown if any populated properties in the input

business object do not exist in the EIS.

MatchesExceededLimitException

is thrown if the number of hits in the EIS exceeds

the value of MaxRecords as defined in the interaction specification. The property
MatchCount will contain the actual number of hits that the adapter had in the EIS
so that users can either increase their limit or refine their search appropriately.

EISSystemException

is thrown if the EIS reports any unrecoverable errors.

Custom operations:

Adapters support custom operations that enable more robust means of
interrogating or modifying the EIS. Custom operations include Execute (to execute
a stored procedure or script) or Lock (to lock an entity in the EIS).

For custom operations, implementations should accept both after-image and delta
business objects and simply use the values provided in the data portion of the
business graph. For example, if a delta is provided without enough information to
perform a custom request operation, the adapter should attempt to retrieve the
necessary information from the EIS application when possible or throw an
InvalidRequestException

that expands missing data.

For custom operations, implementations can interpret the data coming in the input
cursor in any way that is desirable. Be sure to throw the appropriate exceptions if
the input data is insufficient.

Inbound event notification

When you enable inbound event-notification, business processes are alerted to
changes in, or new information about, an EIS.

Inbound event notification complements outbound request processing, enabling
adapters to provide bi-directional communication between business processes and

WebSphere Adapter development overview

79