Configuring a SFTP Emit Service

How to:

Reference:

The SFTP Emit service is used to emit a message using SFTP to a specific directory on a defined host.

To configure a SFTP Emit service:

  1. Perform the steps as described in Configuring Services.
  2. Ensure that you select SFTP Emit Agent {com.ibi.agents.XDSFTPEmitAgent} as the service type you are configuring.

    For a complete description of the configuration parameters that are available for the SFTP Emit service, see SFTP Emit Service Parameters.

    For a complete description of the edges that are returned by the SFTP Emit service, see SFTP Emit Service Edges.

Reference: SFTP Emit Service Parameters

The following table lists and describes parameters for the SFTP Emit service.

Property Name

Property Description

Host Name

The DNS name (or IP address) of the SFTP server that you want to connect to.

Remote Port

The port number used to connect to the SFTP site, blank for default port 22.

User Name

The user ID on the SFTP server.

Password

The user password on the SFTP server.

Private Key

The path to the private key file used for public-key authentication.

Pass Phrase

The pass phrase used to protect the private key.

Remote Site Folder

The folder or directory on the SFTP site that you want to use as a starting location when you connect. A blank value defaults to the login directory.

File Protect

This emits a temporary name and then renames it to the desired name.

File Pattern

This specifies the output file pattern to be used.

Retry Interval

The retry interval in seconds (allows for xxhxxmxxs format). Omit or use 0 for no retry.

Return

Select one of the following values:

  • Status. The status document will be the output document.
  • Input. The input document will be the output document.

Reference: SFTP Emit Service Edges

The following table lists and describes the edges that are returned by the SFTP Emit service.

Edges

Description

success

Operation completed successfully.

fail_connect

Failed to connect to SFTP host for 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.

Procedure: How to Test a SFTP Emit Service Using a Private Key File

The test case is similar to the SFTP emitter, as shown in Configuring a Secure FTP Emitter. However, in this case a service is used to emit the file to the SFTP server using private key file. A SFTP Emit service would be used instead of a SFTP Emitter when a process flow which performs a sequence of tasks (for a business process) needs to be used and statuses need to be evaluated.

  1. Construct a process flow called sftp, which consists of a Service object (for example, sftpservice) that refers to the XDSFTPEmitAgent class, as shown in the following image.

    As shown in the above example, the value of the Host Name can be

    edasol29

    and the username can be

    edasxr

    where:

    edasxr

    Has write access to the Remote Site Folder directory.

    Also, the Private Key file can point to the id_dsa private key file on the iway server. Enter the values of the fields as shown above.

  2. Construct the process flow as shown in the following image.
  3. Add the sftp process to a route (for example, myRoute).
  4. Construct a channel (for example, File1) consisting of a file inlet, myRoute, and a default outlet.
  5. Build and deploy the channel.
  6. Start the channel.
  7. Copy an XML file to the directory where the File1 listener is listening.

    The File1 channel processes this message and copies the out1.xml file to the directory on the SFTP server referred to by the attribute Remote Site Folder on the sftpservice object in the process flow.