uCosminexus Service Platform, Overview

[Contents][Glossary][Index][Back][Next]

8.3.4 Obtaining a file list from an FTP server

In this transfer pattern, you use a list command from an FTP client or service requester to obtain a file list from an FTP server.

Organization of this subsection
(1) When outputting a file list to a work folder
(2) When outputting a file list to a response message

(1) When outputting a file list to a work folder

The following describes an example in which a file list obtained from an FTP server is output to a work folder and then sent to an FTP client.

Figure 8-8 Procedure for obtaining a file list from the FTP server (when output to a work folder)

[Figure]

The following describes the control flow, list data flow, and business process flow in the figure. The following numbers correspond to the numbers in the figure.

  1. The FTP client executes a list command.
  2. The FTP inbound adapter that receives the list command invokes the FTP reception.
  3. The FTP reception creates a work folder.
  4. The FTP reception invokes a business process. At this time, the information received from the FTP client, such as the FTP command, is stored in a request message and passed to the business process.
  5. The FTP adapter is invoked from the business process. Then, the FTP adapter obtains a file list from the FTP server, and then outputs it to the work folder as an intermediate file.
  6. The file operations adapter is invoked from the business process. Then, the file operations adapter reads the intermediate file from the work folder, and then performs processing such as converting the layout and code.
  7. A reply activity is executed with the business process, and then a response message containing intermediate file information is passed to the FTP reception.
  8. The intermediate file data indicated in the response message is transferred from the work folder to the FTP client.
  9. The FTP reception deletes the work folder and the intermediate file in the work folder.
  10. The FTP reception returns a response to the FTP inbound adapter.
  11. The FTP inbound adapter that receives the response returns the execution result of the list command to the FTP client.

(2) When outputting a file list to a response message

The following describes an example in which a file list obtained from an FTP server is output to a response message and then processed by a business process.

Figure 8-9 Procedure for obtaining a file list from the FTP server (when output to a response message)

[Figure]

The following describes the control flow, list data flow, and business process flow in the figure. The following numbers correspond to the numbers in the figure.

  1. The service requester sends a request for a list command.
  2. Standard reception (Web Services) invokes a business process. At this time, the information received from the service requester, such as the FTP command, is stored in a request message and passed to the business process.
  3. The FTP adapter is invoked from the business process.
  4. The FTP adapter obtains a file list from the FTP server, and then stores it in memory and in a response message.
  5. The list data in the response message of the FTP adapter is obtained by using a request message for the invoke java activity, and then analyzed.
  6. The business process returns a response message to standard reception (Web Services).
  7. Standard reception (Web Services) returns a response to the service requester.