Processing an item after the business review/approval process completes

Details how a Process_Reviewed_Item collaboration object synchronizes an item to a back-end file system and calls a UCCnetMessageSend collaboration object to send a response to UCCnet. It also suggests ways of synchronizing an item to a customized back-end application other than a file system or to multiple back-end applications.

Related collaboration templates and business objects

See the following related collaboration templates for more information: See the following related business object for more information:

Description

After the ItemCollector collaboration object merges data into a complete Retail_Item business object, it passes this Retail_Item to a Process_Reviewed_Item collaboration object. The Process_Reviewed_Item collaboration object receives this object on its From port. It then performs several tasks, as follows:
  1. If the collaboration object's DELETE_FROM_LOCAL_STORE configuration property is set to true, it calls an ItemStore collaboration object to delete the item from the item store.
  2. It examines the status of the item and directs processing, as follows:
    • If the item status is Approved, the collaboration object routes the Retail_Item business object to the JTextConnector via its Sync port. The JTextConnector writes the Retail_Item business object to a file system. If this is successful, the item status is changed to Synchronised; if not, the item status is changed to Error. The item is also 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.
    • If the item status is Rejected, the collaboration object routes the Retail_Item to the JTextConnector via its Sync port. The JTextConnector writes the Retail_Item business object to a file system. If this is not successful, the item status is changed to Error. The item is then sent to the respond_to port to be passed to a UCCnetMessageSend collaboration object. See Synchronizing an item to a back-end application other than a file system and Synchronizing an item to multiple back-end applications.
    • If the item status is Accepted or Review, the collaboration object routes the Retail_Item business object back to a ItemValidation collaboration object via its reprocess port. The Process_Reviewed_Item collaboration object then waits for a response. When the item is returned on the reprocess port from the ItemValidation collaboration object, the Process_Reviewed_Item collaboration object processes it, as follows:
      • If the status of the returned item is Review or reprocess, it indicates that the item was successfully processed by the ItemValidation collaboration object and sent to the WebSphere® MQ Workflow business review/approval process by the ItemDispatcher collaboration object. If the original status for the item when it was received on the From port was Accepted, the item with Accepted status is sent to the respond_to port to be passed to a UCCnetMessageSend collaboration object. Otherwise, the item is not sent to the respond_to port. At this point, processing performed by the Process_Reviewed_Item collaboration object ends. When the WebSphere MQ Workflow process triggered by the ItemDispatcher collaboration object completes, the Retail_Item will again be sent to a Process_Reviewed_Item collaboration object's From port.
      • If the status of the returned item is Rejected or Error, the collaboration object sends the Retail_Item to the respond_to port to be passed to a UCCnetMessageSend collaboration object.
  3. Optionally, the collaboration object calls an ItemStore collaboration object to rewrite the Retail_Item to the local item store for back-up or future validation purposes. See Persisting, retrieving, updating, or deleting an item to or from a local item store.

Parent topic: Solution Development Guide