The flow of the process logic for the Create verb.
Logic flow
- A calling collaboration object or connector instantiates a UCCnetMessageSend
collaboration object with a Retail_Item business object, which represents
the item and contains the item data.
- If configured to do so by the collaboration properties, the collaboration
builds a Retail_Audit business object from any optional audit information
included in the triggering Retail_Item and other audit information specific
to the collaboration instance and sends the Retail_Audit object to the Audit
port. The value of the Retail_Item status and the collaboration property
corresponding to that status value determine whether the audit information
is sent to the Audit port.
- The UCCnetMessageSend collaboration object retrieves the layer information
from the local message store by converting the Retail_Item to a UCCnetGBO_storable
business object and passing it to its ToMessage_Store port. The key value
used to retrieve the information from the message store is obtained from the
Retail_Item internals.originalCorrelationID if the attribute is populated.
If it is not, the key value is obtained from the Retail_Item internals.correlationID
attribute.
- 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, as follows:
- If the original command to the demand-side trading partner was a DE_LIST,
WITHDRAW, or CORRECTION, the collaboration object stops processing.
- If the original command to the demand-side trading partner was a NEW_ITEM,
DATA_CHANGE, or NEW_ITEM with reload, the collaboration object does the following:
- Checks the value of the internals.item_status attribute of the Retail_Item:
- If the status of the Retail_Item is Synchronised, the collaboration object
builds a Catalogue Item Confirmation command message with a state of Synchronised.
- If the status is Rejected and the configuration property SEND_REJECT is
set to true, it builds a Catalogue Item Confirmation command message with
a state of Rejected.
- If the status is Accepted and the configuration property SEND_ACCEPT is
set to true, it builds a Catalogue Item Confirmation command message with
a state of Accepted.
- If the status is Review and the configuration property SEND_REVIEW is
set to true, it builds a Catalogue Item Confirmation command message with
a state of Review.
Note: A UCCnetMessageReceive collaboration object can initiate
sending a Review message when an item is first received and sent to the business
review/approval process. Because this process can be long-running, it might
be necessary to send the Review message back to originator of the request.
Normally, UCCnet does not want Review messages to be sent, so it is recommended
that the SEND_REVIEW property be set to false.
- Composes a 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 (see TOAS2_RESPONSE_MAP). The resulting UCCnetGBO_envelope business object
contains all of the information needed for the UCCnet Catalogue Item Confirmation
message.
- If the Retail_Item status and the corresponding audit enable collaboration
property value resulted in building the Retail_Audit business object and writing
it to the Audit port, and, if the AUDIT_OUTPUT collaboration property is set
to true, then the Retail_Audit business object, including any modifications
made by the external audit process bound to the Audit port, is appended to
the UCCnetGBO_envelope business object. If the audit information is included
in the UCCnetGBO_envelope business object, it must be removed from the message
before being sent to UCCnet.
- Passes the UCCnetGBO_envelope business object to the AS2 channel connector
through either a map of the form:
- UCCnetGBO_envelope_to_UCCnetxxx_envelope if iSoft connectivity
is used
- UCCnetGBO_envelope_to_UCCnetTPIxxx_envelope if TPI connectivity
is used
- UCCnetGBO_envelope_to_UCCnetJMSxxx_envelope if WebSphere® Business
Integration Connect is used with JMS
Note: The variable xxx specifies the XML definition type used
(DTD or XSD).
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.
- Checks the Retail_Item internals.lastCascadedGLN attribute. If the attribute
is not set tofalse, it deletes the entry from the message
store by converting the business object to a UCCnetGBO_storable business object
and passing this object to its ToMessage_Store port. This port is bound to
the appropriate persistence mechanism, such as a MessageStore collaboration
object, which performs the actual deletion. If the internals.lastCascadedGLN
attribute is set to false there are more cascaded GLN Retail_Items
to be processed and the message store information should not be deleted yet.
The AS2 channel connector calls the IBM® WebSphere Business Integration Data Handler
for XML to produce the XML message and passes this message to the AS2 channel
server (iSoft Peer-to-Peer Agent, TPI server or WebSphere Business
Integration Connect). An AUTHORIZED authorization command for DTDs or SYNCHRONISED
Catalogue Item Confirmation command for XSDs is sent to UCCnet.
- Regardless of the original command type, if the status of the item is
Error, the UCCnetMessageSend collaboration object does the following:
- If the value of its FILTER_DUPLICATE configuration property is true, it
maintains the identifier store by converting the business object to a UCCnetGBO_identifier
business object and calling an IdentifierStore collaboration object to remove
the entry from the identifier store. The key attributes for DTD processing
are gtin, version, and topic. The key attributes for XSD processing are gtin,
topic, dataRecipientGLN, dataSourceGLN, targetMarket, and uniqueCreatorID.
- It deletes the entry from the message store by converting the business
object to a UCCnetGBO_storable business object and passing this object to
its ToMessage_Store port. This port is bound to the appropriate persistence
mechanism, such as a MessageStore collaboration object, which performs the
actual deletion.
- It stops further processing of the Catalogue Item Confirmation command
so that no response is returned to UCCnet.
If configured to do so by a collaboration property, any exceptions detected
by the collaboration are packaged in a Retail_Error business object and written
to the Error port.