Configuring a FTP File Operations for Process Flows Service

Reference:

The FTP File Operations for Process Flows service is used to perform simple operations on the FTP server based on parameters provided by an XML input document.

To configure a FTP File Operations for Process Flows service:

  1. Perform the steps as described in Configuring Services.
  2. Ensure that you select FTP File Operations for Process Flows {com.ibi.agents.XDNPFFTPOpsAgent} as the service type you are configuring.

    For a complete description of the configuration parameters that are available for the FTP File Operations for Process Flows service, see FTP File Operations Service Parameters.

    For a complete description of the edges that are returned by the FTP File Operations for Process Flows service, see FTP File Operations Service Edges.

Reference: FTP File Operations for Process Flows Service Parameters

The following table lists and describes parameters for the FTP File Operations for Process Flows service.

Parameter

Description

Host Parameters

Host Name (required)

In this field, enter the DNS name (or IP address) of the FTP server that you wish to connect to. Use the host port if the standard port is not 21.

Remote Port

This is the port to connect to on the FTP site. Leave it blank for default port 21.

User Name (required)

Name used as the valid user ID on the FTP server.

Password (required)

The valid password for the FTP server.

Account Name

The valid account for the FTP server.

Use Passive Command

If set to true, the service uses a PASV command. Otherwise, it uses the PORT command.

Timeout

Timeout interval for socket in seconds.

Agent Parameters

Operation (required)

Operation to perform on the file hosted by the SFTP Server. Operations supported by this service are as follows:

  • copy. Copies the data from the file addressed by the File (from) parameter to the file named in the File (to) parameter.
  • move. Moves the data from the file addressed by the File (from) parameter to the file named in the File (to) parameter. When successfully completed the file addressed by the File (from) parameter is deleted.
  • rename. Renames the file addressed by the File (from) parameter to the file named in the File (to) parameter. When successfully completed the file addressed by the File (from) no longer exists.
  • prepend. Copies the data from the file addressed by the File (from) parameter to the beginning of the file named in the File (to) parameter.

Operation (continued)

  • append. Copies the data from the file addressed by the File (from) parameter to the end of the file named in the File (to) parameter.
  • delete. Deletes the file addressed by the File (from) parameter from the host.
  • size. Gets the size of the file addressed by the File (from) parameter from the host. The return is places in the Special Register named in the Remote Size parameter.
  • exist. Verifies that the file addressed by the File (from) parameter exists on the host.

File (from) (required)

Name of the source file. This field may be a relative or absolute file paths, a SREG or XPath expression. This is a required field.

File (to)

The name of the destination file. Wild cards are accepted. This is a required field except when operation is delete, size, or exist.

File (to) a directory name

References a directory. For more information on this parameter, see the description and example that follows this table.

File (to) Create Directories

Creates a directory if one does not exist. For more information on this parameter, see the description and example that follows this table.

Size

Name of the Special Register designated to hold size. This field is required when operation is size.

Out Document (required)

Specify the document to be returned by the operation (bad input defaults to result).

Selecting result returns the results of the requested operation. In the case of copy, move, rename, delete, size, and exist, the status document containing the status of the function is returned.

The functions prepend and append result in the file data being returned. This data will be the same as the data found in the file addressed by the File (to) parameter.

Action on Failure (required)

Determines whether the input document or status document is returned on failure.

Retry

If non-zero, the operation will be retried n times at one-second intervals.

SSL Parameters

Use SSL

If set to true, the connection is secured using Secure Sockets Layer (SSL).

Security Protocol

This shows the type of security protocol to be used. The following list describes the options of the security protocol.

  • SSL. This protocol supports some versions of SSL, and may also support other versions.
  • SSLv2. This protocol supports SSL version 2 or higher.
  • SSLv3. This protocol supports SSL version 3, and may support other versions.
  • TLS. This protocol supports some versions of TLS, and may also support other versions.
  • TLSv1. This protocol supports TLS version 1, and may support other versions.

This field is not needed if Keystore is a SSL Provider.

Secure Data Connection

This is used to enable a secure data connection, such as transferring data securely. It is used in conjunction with Secure Control Connection.

Use 128-bit Encryption

This parameter enforces the use of 128-bit encryption.

SSL Security (required)

This parameter describes the FTP Server connection type. Select one of the following options:

  • unknown. This setting defaults to Explicit Security then fails over to Implicit Security.
  • explicit. In order to establish the SSL link, explicit security requires that the FTP client issue a specific command to the FTP server after establishing a connection. The default FTP server port is used.
  • implicit. Implicit security automatically begins with an SSL connection as soon as the FTP client connects to an FTP server. In implicit security, the FTP server defines a specific port for the client (typically 990) to be used for secure connections.

Keystore File or Keystore Security Provider

In this field, you can:

  • Enter the full path to the Keystore file, which provides certificate material to be used for SSL connection.
  • Name the Keystore Security Provider.
  • Use the configured default Keystore Security Provider by leaving it blank.

Keystore Password

This field is used to enter the password to access Keystore File. This is not required if Keystore File or Keystore Security Provider is the name of a Keystore Security Provider.

Keystore Type

This field shows the type of the Keystore. It is not needed if Keystore File or Keystore Security Provider is the name of a Keystore Security Provider.

File (to) a directory name Parameter

The File (to) a directory name parameter references a directory.

The default value for this parameter is false and iSM will use the path specified in the File (to) parameter to reference a file path. If the File (to) a directory name parameter is set to true, then iSM will use the File (to) parameter to reference a directory path and the file created will have the same file name as the File (from) parameter.

Example:

The File (from) parameter has the file name temp/output.xml, the File (to) parameter has the name prod/final, and the File (to) a directory name parameter is set to true. The results can be found in the file output.xml in the directory prod/final. Otherwise, if the File (to) a directory name parameter is set to false (default), the results will be found in the file final in the directory prod.

Note: iSM supports the creation of dynamic File (to) file names using special iSM file name patterns using a combination of the following three characters (#*^). These characters are only allowed when the File (to) parameter is a file name (File (to) a directory name parameter is set to false). If the File (to) a directory name parameter is set to true and the parameter contains one of the iSM pattern characters (#*^), an error occurs.

Additionally, iSM’s pattern control file is saved in the file directory:

[iwayworkdir]/ftpdata/File (to) parent directory

For example, if using the FTP Ops service and the File (to) parameter is set to prod/ism####.xml, then the pattern control file would be located as follows:

[iwayworkdir]/ftpdata/prod/.ism####.xml

File (to) Create Directories Parameter

The File (to) Create Directories parameter creates a directory if one does not exist.

iSM now supports dynamic creation of the directory tree. The default value for the File (to) Create Directories parameter is false. If set to false, the directory structure is expected to already be in place, and if not, an error is returned. If set to true however, iSM will attempt to create the directory structure defined by the File (to) parameter. If successful, the full tree structure as defined in the File (to) parameter will be created before the function is performed.

Example:

The File (to) parameter is set to prod/final/f0001.xml. iSM checks for the existence of the directory prod. If prod does not exist, then prod is created. Next the directory final is checked. If final does not exist, then final is created and so on until the directory structure is complete. Once the directory structure is in place the service executes the configured function.

Note: If an attempt to create the tree structure fails (due to an error being returned from the remote system), some part of the tree structure may have been created. It is the responsibility of the user to determine the correct course of action to stabilize the directory structure of the remote system.

Reference: FTP File Operations for Process Flows Service Edges

The following table lists and describes the edges that are returned by the FTP File Operations for Process Flows service.

Edge

Description

success

Operation completed successfully.

fail_parse

Failed to properly parse the input parameters of the service.

fail_connect

Failed to connect to FTP host for any one of the following reasons:

  • The host name (IP) is invalid.
  • The User ID is invalid.
  • The password of the user is invalid.
  • The connection failed.

fail_operation

Invalid parameters or other error.