66 WebSphere Business Integration Adapters
Outcome status for RetrieveByContent processing
The RetrieveByContent operation should return one of the outcome status
values as shown in Table 6-5.
Table 6-5 Possible outcome status for the RetrieveByContent operation
6.6 Handling the Update verb
When the business object handler obtains an Update verb from the request
business object, it must ensure that an existing application entity, whose type is
indicated by the business object definition, is updated as follows:
For a flat business object, the Update verb indicates that the data in the
specified entity must be modified as necessary until the application entity
exactly matches the request business object.
For a hierarchical business object, the Update verb indicates that updates to
the application entity must be made to match the entire business object
RetrieveByContent condition Outcome status
If the RetrieveByContent operation finds a single entity that matches
the query, it returns a “Value Changed” outcome status.
VALCHANGE
If the IgnoreMissingChildObject is True, the RetrieveByContent
operation returns the “Value Changed” outcome status for the
business object if it is successful in retrieving the top-level object,
regardless of whether it is successful in retrieving its children.
VALCHANGE
If the RetrieveByContent operation finds multiple entries that match
the query, it:
Retrieves only the first occurrence of the match; this business
object is returned to the Adapter Framework through the
request business object parameter.
Fills a return-status descriptor with further information about the
search.
Returns a status of “Multiple Hits” to notify the Adapter
Framework that there are additional records that match the
specification.
MULTIPLE_HITS
If the RetrieveByContent operation does not find matches for
retrieve by non-key values, it:
Fills a return-status descriptor containing additional information
about the cause of the RetrieveByContent error.
Returns a “RetrieveByContent Failed” outcome status.
RETRIEVEBYCONTENT_FAILED
Chapter 6. Business object handlers 67
hierarchy. To do this, the connector might need to create, update, and delete
application entities as follows:
If child entities exist in the application, they are modified as needed.
Any child business objects contained in the hierarchical business object
that do not have corresponding entities in the application are added to the
application.
Any child entities that exist in the application but that are not contained in
the business object are deleted from the application.
Standard processing for the Update verb
The following steps outline the standard processing for an Update verb:
1. Creates a new business object of the same type as the request business
object. This new business object is the response business object, which will
hold the retrieved copy of the request business object.
2. Retrieves a copy of the request business object from the application.
Recursively retrieves the data for the entire entity from the application using
the primary keys from the request business object:
For a flat business object, retrieves the single application entity.
For a hierarchical business object, uses the Retrieve operation to descend
into the application business object, expanding all paths in the business
object hierarchy.
3. Places the retrieved data in the response business object. This response
business object is now a representation of the current state of the entity in the
application. The Update operation can now compare the two hierarchical
business objects and update the application entity appropriately.
4. Updates the simple attributes in the application entity to correspond to the
top-level source business object.
5. Compares the response business object (that were created in step 2) with the
request business object. Performs this comparison down to the lowest level of
the business object hierarchy. Recursively updates the children of the
top-level business object, following these rules:
If a child business object is present in both the response business object
and the request business object, recursively updates the child by
performing the Update operation.
If a child business object is present in the request business object, but not
in the response business object, recursively creates the child by
performing the Create operation.
If a child business object is not present in the request business object, but
is present in the response business object, recursively deletes the child

Get WebSphere Business Integration Adapters: An Adapter Development and WebSphere Business Integration Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.