About the Connect:Direct file transfer sample

The IBM Sterling Connect:Direct file transfer sample demonstrates how to use the Connect:Direct nodes when working with IBM Sterling Connect:Direct in conjunction with IBM Integration Bus. The sample demonstrates the following tasks:

The sample is based on the following scenario:

The headquarters (HQ) of a small bank authorizes all account transfer information for bank accounts from its Winchester and Eastleigh branches daily. HQ receives the account transfers as WebSphere MQ messages and saves them in a single batch file. After the last transfer for the day is sent, each branch sends an end-of-day message to HQ. When HQ receives the end-of-day message from both branches, it uses IBM Sterling Connect:Direct to transfer the batch file to an external authorizing service provider, together with instructions on how to check the transfers. After the authorizing is done, HQ receives the authorized account transfer records in a new batch file. HQ then archives the batch file and sends the authorized account transfer records to the individual branch WebSphere MQ queues.

screen capture of the SendToauthorizingSystem message flow.

The scenario is implemented by using three messages flows, which are described in the following sections:

HQ receives transfers from the branches and sends them to the authorizing system
SendToAuthorisingSystem.msgflow

This message flow runs on the integration node in HQ and receives the account transfers that require authorization from the branches. It adds the ReplyToQ to the account transfer records and collects them in a batch file. It then uses IBM Sterling Connect:Direct to transfer the file to the external authorizing service provider.

  1. The MQInput node receives individual account transfer records from either the Winchester or the Eastleigh branch and sends each of them to the Compute node.
  2. The Compute node detects if a message is an end-of-day message and increments a counter if so.
  3. If the message is not an end-of-day message, the Compute node extracts the ReplyToQ from the MQMD header and adds it to the record.
  4. The Compute node sends the record to the CDOutput node.
  5. The CDOutput node batches all records in a local file.
  6. When both branches have sent their end-of-day message, the Compute node sends a message to the Finish File terminal of the CDOutput node.
  7. The CDOutput node transfers the batch file to the authorizing service provider.

screen capture of the SendToauthorizingSystem message flow.

The authorizing service provider processes the transfers
AuthorisingSystem.msgflow

This message flow emulates the authorizing system from the external service provider. It checks and authorizes each account transfer record in the received batch file and collects the authorized records in a new batch file. It then uses IBM Sterling Connect:Direct to transfer the file to HQ.

  1. The CDInput node receives the file sent from HQ.
  2. The CDInput node parses the records in the batch file, each of which represents an account transfer. It sends each record to the Mapping node.
  3. The CDInput node populates the local environment with metadata from the Connect:Direct transfer.
  4. The Mapping node moves each account transfer record to the output message.
  5. The authorized records are sent to the CDOutput node.
  6. The CDOutput node batches all records in a local file.
  7. When the CDInput node has processed every record from the batch file, it sends a message from its End of Data terminal to the Finish File terminal of the CDOutput node.
  8. The CDOutput node transfers the authorized transfers as a batch file back to HQ.

Screen capture of the authorizingSystem message flow.

HQ receives the authorized transfers from the authorizing system and replies to the branches
ReceiveFromAuthorisingSystem.msgflow

This message flow runs on the IBM Integration Bus in HQ and receives the authorized account transfers in a batch file. For each account transfer in the batch file, it replies to the branch that initiated the query. The reply is sent to the WebSphere MQ queue that was specified as ReplyToQ in the MQMD header in the initial query message.

  1. The CDInput node receives the batch file with the authorized records.
  2. The CDInput node parses the records in the batch file and sends each record to the MQHeader node.
  3. The MQHeader nodes adds a default MQMD header to each record before sending it to the Mapping node.
  4. The Mapping node moves the ReplyToQ information from the record to the MQMD header.
  5. The MQReply node uses the information in the MQMD header to transfer each record to the branch that sent the original query.
  6. The CDInput node archives the received batch file by adding a timestamp to its name.

Screen capture of the ReceiveFromauthorizingSystem message flow.

Back to sample home