Getting started with FTP in xDI Designer

Follow this guide to get started with FTP metadata, and use it in a process.

Create the metadata

Open the Create Metadata wizard. Choose the FTP Server type, and give your metadata a meaningful name.

Creation wizard showing FTP metadata type

After the wizard closes, the FTP metadata opens in another tab, and is ready for you to configure.

Define the FTP server

The top-level metadata node has all the properties needed to configure connections to an FTP server. Fill out the fields as needed for your server.

Properties for the FTP metadata node

Table 1. Basic properties
Property Description

Name

User-defined label to help reference the entry later.

Host

Hostname or IP address of the FTP server.

Port

Internet port on which the FTP server is listening.

User

FTP username.

Password

FTP password.

Table 2. Proxy properties
Property Description

Host

Hostname or IP address of the proxy.

Port

Internet port to use for the proxy.

Username

HTTP username for the proxy.

Password

HTTP password for the proxy.

Define remote directories for later use

In FTP Server metadata, you can preconfigure remote paths to use in various FTP processes.

Right-click the top-level FTP Server metadata node, and select New > Remote directory.

FTP metadata submenu labeled Remote directory.

Edit the subnode properties by filling out the corresponding fields.

Table 3. Basic properties
Property Description

Name

User-defined label to help reference the remote directory entry later.

Path

Directory on the remote server to perform operations in, relative to the connection directory.

System Absolute Path

Directory on the remote server to perform operations in, as an absolute path.

Properties for the FTP metadata

Use the metadata in processes

Designer has three process actions which can use FTP metadata objects:

Drag and drop an FTP metadata object onto one of these actions to fill out connection settings automatically.

FTP process actions can also take Remote directory nodes from FTP metadata objects instead. Remote directory nodes set both the connection and the remote directory.

Run FTP commands in a process

To run FTP commands, open a process, and create a Run FTP Commands process action. Drag and drop your FTP server metadata object onto the action.

Example of FTP Command process action creation

Configure additional parameters of the action as needed for your environment.

In the Expression Editor for the action, enter the list of commands you want to execute on the FTP server.

Example of FTP Command process action with configured commands

Execute your process to execute the action, and its FTP commands.

Send a single file in a process

To send a local file to a remote FTP Server:

  • Open a process, and create a * Send Files with FTP process action from the palette.

  • Drag and drop a Remote directory node from your FTP server metadata object onto the action.

  • Set the Ftp Local Filename action property to the path of a local file.

  • Uncheck Multiple Mode to transfer a single file.

Dragging and dropping a Remote directory node onto the action automatically sets the FTP hostname, username, and the remote directory to save the file to.

Views of {di-designer-name-regular with configuration information} showing how to send a single file

After execution, the FILE_NB variable confirms one file was transferred.

Send multiple files in a process

To send multiple local files to a remote FTP Server, follow the previous steps with these differences:

  • Make sure Multiple Mode is checked.

  • Set the Ftp Local Path property to the path of a local directory containing your files.

  • Set the Ftp Local Filename property to a pattern matching your file names, such as .txt, .png, or similar.

Views of {di-designer-name-regular with configuration information} showing how to send multiple files

In this example, the FILE_NB variable confirms multiple files were transferred.

Best practices

It is a good idea to use metadata objects instead of defining the equivalent parameters in process actions. Using metadata objects simplifies maintenance, debugging, and updates. You can also use configurations to test different settings and environments.

For more information about configurations, see Work with Metadata configurations.