Overall process logic

This section describes the overall process logic. Related sections show specific conditions you can specify.

Logic flow

The following flow shows the process logic for this collaboration template's Create verb.
  1. A Process_Reviewed_Item collaboration object is triggered by the receipt of a Retail_Item business object in its From port. The Retail_Item must contain a status in the attribute specified in the ITEM_STATUS_ATTRIBUTE configuration property, indicating the state of the processing of the item, such as Review, Approved, Rejected, or Error. By default, this attribute is internals.item_status.
  2. If the value of the DELETE_FROM_LOCAL_STORE configuration property is set to true, the Process_Reviewed_Item collaboration object enables deletion of the Retail_Item from the local item store by sending the business object and the Delete verb to the local_store port.
  3. The Process_Reviewed_Item collaboration object processes a Retail_Item business object based on the value of the attribute specified in the ITEM_STATUS_ATTRIBUTE property, 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.
    • 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.
    • 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 accepted 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.
  4. If the Retail_Item is sent to the Sync port and if configured to do so via a collaboration property, the collaboration builds a Retail_Audit business object from any optional audit information included in the triggering business object and other audit information specific to the collaboration instance and the Retail_Item being processed and sends the Retail_Audit object to the Audit port. The audit data, including any changes made by the external audit process, is appended to the Retail_Item and passed along to the reprocess port or the respond_to ports as appropriate for further processing. If the audit configuration property is not enabled the audit data is not sent to the Audit port. Any audit information included in the triggering Retail_Item is passed along to the subsequent ports.
  5. If the value of the RETAIN_ITEM_IN_LOCAL_STORE configuration property is set to true, the Process_Reviewed_Item collaboration object rewrites the Retail_Item to the local item store by sending the business object and the Create verb to the local_store port. The default value of this configuration property is false. See Persisting items in and deleting items from the local item store

If error conditions are encountered during any stage of processing, the Process_Reviewed_Item collaboration object sets the Retail_Item business object's attribute value named in the configuration property ITEM_STATUS_ATTRIBUTE to Error, logs the error, and returns the object to the calling collaboration object through its From port.

A Process_Reviewed_Item collaboration object can log the Retail_Item business object in the configured IBM® WebSphere InterChange Server (ICS) log destination based on the value of the attributes named in the following configuration properties:

Parent topic: Process_Reviewed_Item template processes