Technical Blog Post
Abstract
AS3 in Sterling B2B Integrator Explained - Part 3 - Inbound Flow
Body
Inbound Data flow:
An inbound data flow is the flow initiated by receiving an AS3 message from a remote partner.
See also related blogs:
There are two ways to receive inbound data; either trading partner sends you the data or you collect the data from them, the end result is the same, the data is deposited in the specified Inbound AS3 mailbox.
Trading partner sends data | Customer picks up data |
Perimeter server, on the DMZ or local, receives the FTP PUT. Looks at the destination port and gives the request to the appropriate FTP server adapter to handle. The FTP server adapter takes the request, and places the data on the mailbox specified, for AS3, by default, all messages should be placed under mailbox /TPRootMbx/InboundAS3. | Trading partner profile is set with option to: "Pick up message from trading partner FTP server". A BP has been developed and scheduled containing the AS3Build service with the specific contract for this partner assigned. The AS3 build service will lookup the trading partner profile details based on the contract information and pass those details to the BP AS3MessageInitiation AS3MessageInitiation will invoke inline the BP Sub_AS3PickUpMessage that will connect to TP FTP server, change to the download directory and in turn invoke inline another BP called Sub_AS3DownloadMessage that will LIST and GET the message according to the filter specified on the TP profile, message is then added to the Inbound mailbox for AS3 using the MailboxAdd service, by default, all messages are placed under mailbox /TPRootMbx/InboundAS3. |
A routing rule is configured, by default, "Routing Rule created by the AS3 auto create option", during the trading partner profile configurations, it is set to evaluate automatically and once a new message comes into the mailbox, then next evaluation of the routing rule will call BP AS3MbxProcessing.
The AS3MbxProcessing BP will extract the data from the /TPRootMbx/InboundAS3 mailbox, parse the data using the AS3Parse service, that service will verify the signature and decrypt the data, lookup the TP profile, generate an MDN if needed, rename the MDN if any options to rename before upload were set and will pass the necessary details to process further the data and the MDN to the BP AS3MDNInitiation, The BP will then delete the message from the /TPRootMbx/InboundAS3 mailbox.
AS3MDNInitiation BP will behave differently depending on the trading partner profile settings:
If the AS3 message received doesn't require MDN:
AS3MbxProcessing BP will invoke inline Sub_AS3PutMDNToMbx BP, the name is a bit contradictory since no MDN is being generated, the BP will simply add (MailboxAdd Service) the payload of the AS3 message parsed by the AS3Parse service to the payload mailbox, by default it will be /TPRootMbx/Payload.
If the trading partner profile has a "Messaging action" set to "Send MDN directly to trading partner":
AS3MbxProcessing BP will invoke inline SubAS3SendMDN BP that will establish an FTP connection to TP and place the MDN on the specified MDN directory, if the MDN transfer is successful it will then add (MailboxAdd Service) the payload of the AS3 message parsed by the AS3Parse service to the payload mailbox, by default it will be /TPRootMbx/Payload; If the MDN transfer errors then the Payload will be placed into the error mailbox, /TPRootMbx/Error.
If the trading partner profile has a "Messaging action" set to "Copy MDN to trading partner outbox":
AS3MbxProcessing BP will invoke inline Sub_AS3MDNMonitoring BP, that will add the MDN to the MDN outbound mailbox (/TPRootMbx/OutboundMDN) and the extracted payload to the temporary holding mailbox (/TPRootMbx/Holding), it will then use the MailboxQuery service to verify if the MDN has been picked up by the TP by looping through it together with a Wait service until either the MDN is picked up or a timeout is reached; If the MDN is picked up, it will then add the extracted AS3 message to the Payload mailbox (/TPRootMbx/Payload) as well as delete it from the Holding mailbox (/TPRootMbx/Holding); If a timeout is reached, it will add the extracted AS3 message to the error mailbox (/TPRootMbx/Error) and delete it from the holding mailbox (/TPRootMbx/Holding).
See also related blogs below about setting up an AS3 trading partner and outbound data flow:
UID
ibm11121991

