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 > Adapter Toolkit > Implementing code from the IBM WebSphere Adapter Toolkit > Data model > Business object standards
Standard processing logic
Each adapter should enable operations that are supported by the EIS.
General guidelines for operations with adapters include the following
- All operations should be atomic: if an operation fails for any reason, the adapter should roll back any partial changes made to the EIS as part of the request.
- For all operations, adapters should never modify the input business object passed by the client (per JCA standards). Instead, if the operation requires the same object passed as input to be returned as output, use WebSphere Business Integration utilities to create, modify, and return a deep copy of the input object.
- If child objects are included in the input business object, the order of child objects should be maintained in the output business object. Doing so enables relationship management service support.
- If an after-image is passed to the adapter as input, an after-image should be returned as output. The same applies for deltas.
- 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.- 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).- 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.- 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.- After-image Update operation
The after-image update operation modifies an EIS entity so that it and its child objects match the data and structure of the input business object. It requires an explicit comparison of the input business object to the EIS system.- After-image Delete operation
The after-image Delete operation removes an existing entity and any contained child entities from the EIS.- Retrieve
This operation rebuilds the complete business object hierarchy. The adapter ensures that the returned hierarchical business object matches exactly the database state of the application entity.- RetrieveAll
RetrieveAll returns a batch of records that match the values provided in the request business object. The records are returned as a collection of business objects through a top-level container business object.- 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).