Detailed workflow: synchronizing a business object to a back-end system

The following outlines the solution workflow as a business object passes from an ItemCollector collaboration object to a Process_Reviewed_Item collaboration object, which synchronizes the business object to the back-end system and initiates sending a response to UCCnet through a UCCnetMessageSend collaboration object.

Related information

For more detailed process logic behind the steps in this high-level flow, see the following collaboration templates: Also, refer to the Installation guide for detailed information on creating port connections between collaboration objects and between collaboration objects and connectors.

Workflow

  1. An ItemCollector collaboration object sets the Retail_Item internals.originalCorrelationID attribute to the value obtained from the original Retail_Item internals.correlationID attribute (the one saved by the ItemValidation collaboration object) and then passes the Retail_Item business object to a Process_Reviewed_Item collaboration object, which receives it on its From port. The internals.originalCorrelationID is used by the UCCnetMessageSend collaboration object to access the original message in the message store.
  2. If configured to do so, the Process_Reviewed_Item collaboration object enables deletion of the item from the item store by passing the business object with a Delete verb to its local_store port to be passed to an ItemStore collaboration object.
  3. The ItemStore collaboration object receives the business object on its From port and, through a series of interactions with the IBM® WebSphere® Business Integration Data Handler for XML, deletes the item from the item store. The section Persisting, retrieving, updating, or deleting an item to or from a local item store describes in detail how a business object is deleted from the item store.
  4. The Process_Reviewed_Item collaboration object directs processing according to the status of the business object. For the purposes of this example, assume that the status of the business object is Approved. See Processing an item after the business review/approval process completes. Because, in this example, the Retail_Item business object status is Approved, the following operations occur:
    1. The business object is routed to the JTextConnector via the Process_Reviewed_Item collaboration object's Sync port. The JTextConnector writes the Retail_Item business object to a file system. If this is successful, the item status is changed to Synchronized; if not, the item status is changed to Error.
    2. The business object is sent to the respond_to port to be passed to a UCCnetMessageSend collaboration object. Alternatively, the Retail_Item can be sent to a single application other than the JTextConnector or to multiple back-end applications. See Synchronizing an item to a back-end application other than a file system and Synchronizing an item to multiple back-end applications.
  5. Optionally, the Process_Reviewed_Item collaboration object rewrites the Retail_Item to the local item store by sending the business object and a Create verb to the local_store port to be passed to an ItemStore collaboration object.
  6. The ItemStore collaboration object receives the business object on its From port and, through a series of interactions with the IBM WebSphere Business Integration Data Handler for XML, stores the item in the item store. The section Persisting, retrieving, updating, or deleting an item to or from a local item store describes how a business object is persisted to the item store.
  7. The UCCnetMessageSend collaboration object receives the Retail_Item business object on its FromRetail port. It then retrieves the layer information from the local message store by using the Retail_Item internals.originalCorrelationID and converting the Retail_Item to a UCCnetGBO_storable business object and passing it with a Retrieve verb to a MessageStore collaboration object through its ToMessage_Store port. If the Retail_Item internals.originalCorrelationID attribute is not populated the Retail_Item internals.correlationID attribute value is used
  8. The MessageStore collaboration object receives the business object on its From port and, through a series of interactions with the IBM WebSphere Business Integration Data Handler for XML, retrieves the message from the message store database and returns it to the UCCnetMessageSend collaboration object. The section Persisting, retrieving, or deleting an item to or from a local message store describes how a message is retrieved from the message store.
  9. The UCCnetMessageSend collaboration object extracts the Catalogue Item Notification command from the UCCnetGBO_storable business object and handles the object according to its original command type, its status value, and the values of certain properties. For the purposes of this example, assume that the original Catalogue Item Notification was a NEW_ITEM and the status is Approved. See Sending responses to UCCnet for more information. The UCCnetMessageSend collaboration object builds a Catalogue Item Confirmation command message, composes the UCCnetGBO_envelope business object by first converting the Retail_Item and UCCnetGBO_storable business objects into a UCCnetGBO_RI_S business object, and then passing this object through the map specified in its TOAS2_RESPONSE_MAP configuration property. The resulting UCCnetGBO_envelope business object contains all of the information needed for the UCCnet Catalogue Item Confirmation message.
  10. The UCCnetMessageSend collaboration object passes the UCCnetGBO_envelope business object to the AS2 channel connector on its ToAS2_Response port. In the connector controller portion of the connector, it is converted to an application specific business object of the form UCCnetxxx_envelope (if iSoft connectivity is used), UCCnetTPIxxx_envelope (if TPI connectivity is used), or UCCnetJMSxxx_envelope (if WebSphere Business Connect is used with JMS). The UCCnetGBO_envelope business object is converted by passing through either the UCCnetGBO_envelope_to_UCCnetxxx_envelope map (if iSoft connectivity is used), the UCCnetGBO_envelope_to_UCCnetTPIxxx_envelope map (if TPI connectivity is used), or the UCCnetGBO_envelope_to_UCCnetJMSxxx_envelope map (if WebSphere Business Connect is used with JMS). The DTD forms of these maps convert outgoing UCCnetGBO_envelope GBOs containing XSD-based Catalogue Item Confirmation commands into ASBOs containing DTD-based Authorization commands.
    Note: The variable xxx specifies the XML definition type used (DTD or XSD).
  11. The UCCnetMessageSend collaboration object checks the Retail_Item internals.lastCascadedGLN attribute to determine if the message store entry should be deleted. If the attribute is not false the UCCnetMessageSend collaboration object enables the deletion of the entry from the message store by using the Retail_Item internals.originalCorrelationID and converting the Retail_Item to a UCCnetGBO_storable business object and passing it with a Delete verb to a MessageStore collaboration object through its ToMessage_Store port. If the Retail_Item internals.originalCorrelationID attribute is not populated the Retail_Item internals.correlationID attribute value is used.
  12. The MessageStore collaboration object receives the business object on its From port and, through a series of interactions with the IBM WebSphere Business Integration Data Handler for XML, deletes the message from the message store. See Persisting, retrieving, or deleting an item to or from a local message store.
  13. The AS2 channel connector calls the IBM WebSphere Business Integration Data Handler for XML to produce the XML message.
  14. The AS2 channel connector passes this message to the iSoft Peer-to-Peer Agent, the TPI server or to WebSphere Business Integration Connect.
  15. An AUTHORIZED authorization command for DTDs or SYNCHRONISED Catalogue Item Confirmation command for XSDs is sent to UCCnet.

A Process_Reviewed_Item collaboration object can be configured to initiate notification if an item has a status of Approved, Accepted, or Rejected or if errors are detected during processing. It connects through its mail port to a Role_Email collaboration object, which actually controls the e-mail. See Controlling e-mail.

A Process_Reviewed_Item collaboration object can also log the business object being processed when an error occurs (in addition to the error) and when item status values are Approved, Accepted, and Rejected. A Role_Email collaboration object can log when errors occur and each time an e-mail message is sent. See Logging.

Parent topic: Processing a business object: an example NEW_ITEM workflow