Process logic for the Create verb.
Flow
- An ItemStore collaboration object is triggered by the receipt of a Retail_Item
business object.
- The Retail_Item business object is copied 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 OBJECT_KEY configuration property in the ItemStore collaboration
object 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 uses the application
specific information in the SerialItem to store it in the database. If the
object already exists in the database, a ServiceCall exception is thrown and
the Create operation fails.
Note: Although multiple objects in the database
with identical keys can be created, because the behavior of record retrievals,
updates, and deletes is unpredictable, you should avoid the use of non-unique
keys.