FTP Get

FTP Get is a synchronous activity that issues an FTP get or mget command to the specified server. The content of the remote files can be placed in the output of the activity or written directly to the local storage. If you select to place the contents of a remote file into the output of the activity, you can only retrieve one remote file (FTP get command) and the file’s content is stored in memory as part of the output of the activity. If you write the contents of the retrieved files to the local storage, you can retrieve one or more files (FTP get or mget commands).

General

The General tab has the following fields.

Field Literal Value/Module Property/Process Property Description
Name None The name to be displayed as the label for the activity in the process.
FTP Connection Yes The path to the shared configuration resource containing the user information such as host name, username, and password.
Quit (post-command) None Select this check box to specify that the FTP connection should be closed after completing this command.

The FTP connection remains open, if this check box in not selected. All the FTP activities that specify the same FTP session (that is, the same host, port, username, and password), can share the FTP session until the connection is closed.

Use Process Data None Specifies to write contents of the file retrieved from the FTP server to the process data.

The output of the activity includes an element that contains the remote file’s contents, and the data can be used by subsequent activities in the process.

Caution: Do not use this option if you are retrieving multiple files. You can only write one files's contents to this output of the activity. Selecting this check box with wildcards specified in the RemoteFileName input element returns an error.
Binary None Specifies whether to retrieve the file content in binary or ASCII mode (selected signifies binary).

Using ASCII mode automatically handles the differences in line endings between the FTP server and the machine executing the FTP command.

The ASCII mode implies text data. This text data can be encoded in a character encoding other than ASCII (such as UTF-8 or Latin-1).

Description

Provide a short description of the activity.

Input

The following is the input for the activity.

Input Item Datatype Description
RemoteFileName string The path and name of the file to retrieve from the remote server. Wildcards (? for any one character, * for one or more characters) are permitted in this field.

You can specify an absolute or relative path for the remote file name. Relative paths are relative to the path specified in the RemoteDirectory element or the current directory, if RemoteDirectory is null.

Note: Do not specify wildcards for this element, if Use Process Data check box is selected.
Host string The name of the FTP server.

This overrides the value specified in the FTP Connection property.

Port integer The port number for incoming FTP requests on the FTP server.

This overrides the value specified in the FTP Connection property.

Username string The username for logging into the FTP server.

This overrides the value specified in the FTP Connection property.

Password string The password for logging into the FTP server.

This overrides the value specified in the FTP Connection property.

Timeout integer The amount of time to wait for the FTP server to respond.

This timeout is used when the FTP server places the FTP connection used by this activity into a waiting state.

Output

The following is the output for this activity.

Output Item Datatype Description
FileTransferred complex When one or more remote files are retrieved and written to the local storage, this element contains a list of the retrieved remote filenames. This element contains the following two elements:
  • Name
  • NumOfBytes

If an error occurs while retrieving the files, the activity output is not available. However, the Fault tab lists the successfully transferred files and the files that failed to be transferred.

Name string The name of the retrieved remote file.
NumOfBytes integer The number of bytes comprised in the associated file name.

Fault

The Fault tab lists the following possible exceptions generated by this activity. For more information about error codes and the corrective actions to take, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.

Fault Generated When..
GetFilesException An error occurred during the FTP get operation.
ConnectionErrorException An error occurred when connecting to the FTP server.
CommandExecutionException An error occurred when executing the FTP command.
ConnectionTimeoutException The connection to the FTP server is timed out before the command execution is complete.