DownloadFile: Downloading a file from a counterpart

Figure 1. DownloadFile scenario
Figure showing DownloadFile scenario

All DownloadFile scenarios are, by their nature, real-time (and not SnF) scenarios. When a file is to be downloaded from a counterpart:

  1. The application constructs a DownloadFile request and puts this request into an interface queue of the MSIF transfer service. The Priority field of the MQMD header of this request specifies its priority.
  2. The MSIF transfer service:
    1. Continually scans its input queue for messages that it is to process
    2. Retrieves, from its input queue, the message with the highest priority. If more than one message has the highest priority, it retrieves the one that was submitted first.
  3. If the message is a DownloadFile request, the MSIF transfer service:
    1. Creates an entry for a DownloadFile scenario in the FTM SWIFT database. It sets the MSIF reference of the scenario to the value of the MQMD.MsgId.
    2. Stores a copy of the DownloadFile request in the audit log (if recording of audit data is enabled for this audit point).
    3. Augments the contents of DownloadFile request with options specified by means of option-set COs or system defaults, as described in Value hierarchy.
    4. Checks whether the options are valid, for example, that all mandatory options are specified and that no mutually exclusive options are specified.
    5. Checks whether the options are compatible with the application service profile (ASP) of the SWIFT service that is to be used, as described in Validation based on ASP data.
    6. Checks whether RMA is used by the SWIFT service and, if so, whether the local RMDS contains a corresponding authorisation to receive (see ASPs and RMA traffic filtering).
    7. Sets the transfer state of the scenario to Requested.
    8. Creates an entry in the message warehouse (if recording of message warehouse data is enabled for the SWIFT service that is used, or for all DownloadFile scenarios).
    9. Initiates a file transfer using the SAG with the SNL ID that was specified in the SAG MP option set. The downloaded file is stored in a directory on the SAG workstation.
    10. If CommType is set to MQHA, it creates an LFT request to copy the file to the MSIF transfer directory on the host. If CommType is set to LOCAL, the file on the SAG workstation is identical to the file in the MSIF transfer directory on the host.
    11. If the counterpart that provided the file for downloading requested a delivery notification, it sends a successful-delivery notification. If the counterpart responds to the delivery notification with a delivery notification response, it ignores the response, even if it indicates that there was an error.
    12. Verifies the downloaded file by comparing the digest that accompanied the file with a locally computed digest.
    13. Marks the file on the SAG workstation as being ready for deletion. The file is deleted later during the automatic housekeeping process.
    14. If specified in the DownloadFile request, it decompresses the received file, converts the code page of its contents, or both.
    15. Depending on the contents of the DownloadFile request, it either:
      • Copies or movesthe contents of the received file into a file, then puts a download response into the response queue. This notification includes the MSIF reference.
      • Copies the contents of the received file to the body of an MQ notification message. The MSIF transfer service puts this message into the reply-to queue specified in the DownloadFile request. This notification includes the MSIF reference.
  4. The application processes the response message and accesses the downloaded file.