แก้ไข

แชร์ผ่าน


FRR Orchestration

A4SWIFT implements FRR through the FRR orchestration. The orchestration determines whether the Correlation Token of the FIN response matches the message ID of the original message. It processes the message in parallel with the send functions performed by the send port that sends the message to SAA, and with the receive functions performed by the receive location that receives the message from SAA.

At the highest level, an instance of the orchestration does the following processing:

  1. Caches a copy of the original outbound message bound for SAA by listening on the MessageBox.

    Note

    BizTalk Server creates an instance of the orchestration when A4SWIFT routes the original message to the MessageBox.

  2. Waits for A4SWIFT to publish a FIN response from SAA to the MessageBox.

  3. Sets promoted properties of the copy of the original message depending upon the nature of the FIN response.

  4. Publishes the copy of the original message back to the MessageBox. Custom handlers can then subscribe to, retrieve, and handle the message as required.

Subscription to Outbound Messages

The FRR orchestration is directly bound to the MessageBox. The FRR orchestration subscribes to all outbound messages bound for the SWIFT network that do not contain validation errors, by subscribing to the following properties:

  • A4SWIFT_Failed==False (as set by the SWIFT Disassembler validation process)

  • A4SWIFT_Swiftbound==True (as set by the SWIFT Disassembler configuration process)

Message/Response Correlation

BizTalk Server correlates the original outbound FIN message to the inbound FIN response message by comparing the following properties:

  • The MQMD_CorrelID context property of the FIN response

  • The A4SWIFT_FRRCorrelationToken property of the outbound MTXYY message. This property is promoted by the party-resolution stage of the receive pipeline.

    The values of these properties must be identical. The encoder stage of the send pipeline for messages bound for SWIFT sets the MQMD_MsgID property of the outgoing message to the value of the A4SWIFT_FRRCorrelationToken property. SAA sets the MQMD_CorrelID property of the response message to the value of MQMD_MsgID.

Setting of Promoted Properties

After receiving a FIN response and correlating it to the copy of the original message, the FRR orchestration sets the following promoted properties of the copy of the original message according to the nature of the response:

  • A4SWIFT_FRRFailed to True if the response was an ACK or False if the response was a NAK

  • A4SWIFT_FRRFailedReason to the one of the following values, if the response was a NAK:

    • <ErrorCode> (from the 405 field of the MTS21_FIN_ACKNAK negative-acknowledgment message)

    • TransportError (from an MQ Series PAN/NAN message)

    • DelayedNAK (from an MT015 (DNK) message)

    • AbortReceived (from an MT019 (Abort Notification) message)

  • A4SWIFT_FRRFailedReason to TimedOut if A4SWIFT did not receive a response within the timeout period. For more information about the FRR Delay Time-out, see the "Reconciliation Time-Out" section below or Setting the FRR Delay Time-Out.

  • A4SWIFT_SendingServiceType to A4SWIFT_FrrService

  • BTS.Operation to the value corresponding to the type of message response. For more information, see Creating the FRR Send Ports for Sending to the Custom Handlers.

    • A4SWIFT_FrrSendTransport for an MQ Series PAN/NAN message (MQ Series transport-level ACK/NAK)

    • A4SWIFT_FrrSend010NDW for an MT010 message (Non-Delivery Warning)

    • A4SWIFT_FrrSend011Delivered for an MT011 message (Delivery Notification)

    • A4SWIFT_FrrSend012SenderACK for an MT012 message (Sender Notification)

    • A4SWIFT_FrrSend015DNK for an MT015 message (DNK, or Delayed NAK)

    • A4SWIFT_FrrSend019Abort for an MT019 message (Abort Notification)

    • A4SWIFT_FrrSendS21ACK for an MTS21_FIN_ACKNAK acknowledgment message (ACK of a FIN message sent by an LT)

    • A4SWIFT_FrrSendS21NAK for an MTS21_FIN_ACKNAK negative-acknowledgment message (NAK of a FIN message sent by an LT)

Direct Binding

Receive inputs for the orchestration are defined by subscriptions that the orchestration makes to the MessageBox. Context properties and values promoted by the orchestration define the send outputs for a message that the orchestration publishes to the MessageBox. Because of this direct binding to the MessageBox, the orchestration is decoupled from the following:

  • The physical receive locations that receive outbound messages from the back-end application for routing to SAA

  • The send ports that send outbound FIN messages from A4SWIFT to the SWIFT Alliance Access (SAA)

  • The receive locations that receive incoming FIN response messages from SAA

  • The physical MQSeries queues where FIN responses are deposited by SAA

Reconciliation Time-Out

When BizTalk Server creates a new instance of the FRR orchestration, the orchestration starts waiting for FIN responses. At run time, you must configure the orchestration to time out after some duration, so that it will not wait for the response indefinitely. When the time-out duration expires, the FRR orchestration promotes the A4SWIFT_FRRFailedReason property and sets it to TimedOut. It then publishes messages out to the MessageBox, and terminates. If you time out, the correlation ID is gone.

You can create a custom handler to process timed-out messages (the copy of the original outbound message). A4SWIFT would accomplish this by using a Listen shape in the orchestration. For more information, see Setting the FRR Delay Time-Out.