IBM WebSphere Adapters Network Card User Manual


 
v Adapters should follow strict conventions in processing business objects. This
includes failing if an entity is marked as updated in the input business object
but does not exist in the EIS (rather than attempting to create the entity in the
EIS).
isSet property:
WebSphere business objects support an isSet property.
isSet property
The isSet() API of the DESPI InputAccessor determines if a given business object
property has been set. When isSet() is false the adapters should ignore the specific
attribute while processing the request.
Strict interpretation of requests:
An adapter should always fail if the user provides data that is inconsistent with
either the behavior of the adapter or the state of the EIS. This requires more effort
from maps or users to ensure that data is appropriate before exposing it to an
adapter. That effort also reduces the chance of miscommunication (that is, that the
adapter will do something unintended).
If an adapter receives a request in which a business object is marked as created
but, in fact, an entity already exists in the EIS with the given key values, the
adapter should fail immediately.
Some WebSphere Adapters have historically made a best effort and defaulted to an
update in such cases. Such adapters attempted to interpret the request and make
every effort to complete it.
ApplyChanges operation:
The applyChanges operation is a catch-all operation that enables users to send any
create, update, or delete business object to the resource adapter for processing
based on the verb.
The applyChanges operation saves effort and simplifies mapping with simple
logic: for after-image business objects, the applyChanges operation should look at
top-level verb in the business object and then call create, update or delete as
appropriate; when applyChanges is invoked without a verb, this is a delta
operation. The adapter should read the SDO change summary and perform all the
changes indicated in the change summary.
After-image Create operation:
The after-image Create operation generates a new entity in the EIS that matches
the data and structure of the input business object. The business object returned by
this operation should accurately reflect the newly created entity in the EIS.
Processing overview
The processing of the after-image create operation, which starts at the top-level
business object, is as follows:
1. Create an entity in the EIS corresponding to the type of the input business
object
74 WebSphere Adapters: WebSphere Adapter Toolkit User Guide