Process logic for the Update verb.
Flow
- A ItemStore collaboration object is triggered by the receipt of a Retail_Item
business object. The triggering business object passed into the ItemStore
collaboration object must contain values for all the fields that make up the
ObjectKey attribute of the stored SerialItem application specific business
object, as defined by the value of the OBJECT_KEY configuration property in the ItemStore collaboration
object.
Note: The entire business object in the database will be replaced by
this operation. Therefore, the calling collaboration object might want to
first retrieve the business object from the database, modify any attributes
which need to be updated, and then again invoke the ItemStore collaboration
object with the modified business object and the Update verb.
- The ItemStore collaboration object copies the triggering Retail_Item business
object into a high-level object called DataStoreRetail_Item. This object is
passed into the IBM® WebSphere® Business Integration Data Handler
for XML. By default, it contains the application specific information needed
by the data handler. The data handler outputs a string, which contains an
XML representation of the Retail_Item business object passed into the collaboration
object.
- The ItemStore collaboration object builds an application specific business
object called SerialItem, which includes two attributes:
- ObjectData, which is set equal to the XML output from the data handler.
- ObjectKey, which is created from the key information in the Retail_Item
business object and the value of the ItemStore collaboration object's OBJECT_KEY
property. This attribute holds the unique key used to store the object in
the database.
- The completed SerialItem is sent to the To port of the ItemStore collaboration
object, which is bound to a JDBCConnector. The JDBCConnector overwrites the
existing SerialItem in the database with the updated one. If the object does
not already exist in the database, a ServiceCall exception is thrown and the
Update operation fails.