SFTP Forwarding Agent Configuration

To open the SFTP forwarding agent configuration, click  Build → New Configuration . Select  Workflow  from the Configurations dialog. When prompted to Select workflow type , select Batch. Click Add agent and select SFTP in the Forwarding tab in the Agent Selection dialog. Double-click the agent icon or right-click the icon and select Edit agent, to display the Agent Configuration dialog.

You can configure part of the parameters in the Filename Sequence tab, see 3.1.6 Workflow Template for more information.

Connection Tab



The SFTP forwarding agent configuration - Connection tab

See the description of the Connection tab in SFTP Collection Agent Configuration.

Target Tab

The SFTP forwarding agent configuration - Target tab

The Target tab contains configuration settings related to the remote host, target directories and target files.



Setting

Description

Setting

Description

Input File Handling Settings

Input Type

The agent can act on two input types. Depending on which one the agent is configured to work with, the behavior will differ.

The default input type is bytearray, that is the agent expects bytearrays. If nothing else is stated, the documentation refer to input of bytearray.

If the input type is MultiForwardingUDR, the behavior is different. For further information about the agent's behavior in MultiForwardingUDR input, see SFTP Forwarding Agent MultiForwardingUDR Input.

File Information Settings

Directory

Absolute pathname of the target directory on the remote host, where the forwarded files will be placed. The pathname may also be given relative to the home directory of the user's account.

The files will be temporarily stored in the automatically created subdirectory DR_TMP_DIR in the target directory. When an End Batch message is received, the files are moved from the subdirectory to the target directory.

Create Directory

Select this check box to create the directory, or the directory structure, of the path that you specify in Directory.

Note!

The directories are created when the workflow is executed.



Compression

Compression type of the destination files. Determines whether the agent will compress the output files as it writes them.

  • No Compression - the agent will not compress the files.

  • Gzip - the agent will compress the files using gzip.





Target File Handling Settings

Produce Empty Files

If you require to create empty files, check this setting.

Handling of Already Existing Files

Select the behavior of the agent when the file already exists, the alternatives are:

  • Overwrite - The old file will be overwritten and a warning will be logged in the System Log.

  • Add Suffix - If the file already exists, suffix ".1" will be added. If this file also exists, suffix ".2" will be tried instead and so on.

  • Abort - This is the default selection and is the option used for upgraded configurations, that is workflows from an upgraded system.

Temporary File Handling Settings

Use Temporary Directory

If this option is selected, the agent will move the file to a temporary directory before moving it to the target directory. After the whole file has been transferred to the target directory, and the endBatch message has been received, the temporary file is removed from the temporary directory.

Use Temporary File

If there is no write access to the target directory and, hence, a temporary directory cannot be created, the agent can move the file to a temporary file that is stored directly in the target directory. After the whole file has been transferred, and the endBatch message has been received, the temporary file will be renamed.

The temporary filename is unique for every execution of the workflow. It consists of a workflow and agent ID, and a file number.

Abort Handling

Select how to handle the file in case of cancelBatch or rollback, either Delete Temporary File or Leave Temporary File.

Note!

When a workflow aborts, the file will not be removed until the next time the workflow is started.



Advanced Tab

The SFTP forwarding agent configuration - Advanced tab

The Advanced tabs contain configurations related to more specific use of the SFTP service, which might not be frequently utilized.



Setting

Description

Setting

Description

Advanced Settings

Port

The port number the SFTP service will use on the remote host.

Timeout (s)

The maximum time, in seconds, to wait for response from the server. 0 (zero) means to wait forever.

Accept New Host Keys

If selected, the agent overwrites the existing host key when the host is represented with a new key. The default behavior is to abort when the key mismatches.

Note!

Selecting this option causes a security risk since the agent will accept new keys regardless if they might belong to another machine.



Enable Key Re-Exchange

Used to enable and disable automatic re-exchange of session keys during ongoing connections. This can be useful if you have long lived sessions since you may experience connection problems for some SFTP servers if one of the sides initiates a key re-exchange during the session.

Buffered Mode

Select this check box to enable buffered mode on the SFTP client.

Additional Hosts Settings

Additional Hosts

List of additional host names or IP-addresses that may be used to establish a connection. These hosts are tried, in sequence from top to bottom, if the agents fail to connect to the remote host set in their Connection tabs.

Use the Add, Edit, Remove, Move up and Move down buttons to configure the host list.

After Treatment Settings

Execute

During transfer a temporary file is written, which is then moved to the final file. Select if the script should be executed on the transferred working copy or the final file with the following two options:

  • Before Move: Execute the following command and its arguments on the temporary file.

  • After Move: Execute the following command and its arguments on the final file.

Command

Enter a command or a script. The script will be executed on the remote system from it's working directory.

Argument

This field is optional. Each entered parameter value has to be separated from the preceding value with a space.

The temporary filename is inserted as the second last parameter, and the final filename is inserted as the last parameter, automatically. This means that if, for instance, no parameter is given in the field, the arguments will be as follows:

$1=<temporary_filename>   $2=<final_filename>

If three parameters are given in the Arguments field, the arguments are set as:

$1=<parameter_value_#1> $2=<parameter_value_#2> $3=<parameter_value_#3> $4=<temporary_filename> $5=<final_filename>

If  After Move has been selected, the argument with <temporary filename> is excluded.

Backlog Tab

The Backlog tab contains configurations related to backlog functionality. If the backlog is not enabled, the files will be moved directly to their final destination when an endBatch message is received. If the backlog however is enabled, the files will first be moved to a directory called DR_POSTPONED_MOVE_DIR and then to their final destination. For further information about the transaction behavior, see Retrieves in SFTP Forwarding Agent Transaction Behavior.

When backlog is initialized, and when backlogged files are transferred, a note is registered in the System Log.

The SFTP forwarding agent configuration - Backlog tab



Setting

Description

Setting

Description

Enable Backlog

Enables backlog functionality.

Directory

Base directory in which the agent will create sub directories to handle backlogged files. Absolute or relative path names can be used.

Max Size Settings

Type

If you select the Files option, the Size field below will determine the maximum number of files allowed in the backlog folder. If you select the Bytes option, the Sizefield below will determine the total sum (size) of the files that resides in the backlog folder. If a limit is exceeded the workflow will abort.

Size

Enter the maximum number of files or bytes that the backlog folder can contain.

Processing Order Settings

Processing Order

Determines the order by which the backlogged data will be processed once connection is reestablished. Select between First In First Out (FIFO) or Last In First Out (LIFO).

Duplicate File Handling Settings

Duplicate File Handling

Specifies the behavior if a file with the same file name as the one being transferred is detected. The options are Abort or Overwrite and the action is taken both when a file is transferred to the target directory or to the backlog.

Security Tab

The SFTP forwarding agent configuration - Security tab

See the description of the Security tab in SFTP Collection Agent Configuration