FTP Move
Allows to move one ore more files via the FTP or SFTP protocol.
Json
Example
json
{
"name": "protocol-ftp-move",
"taskReferenceName": "ftp_move",
"description": "The business description of the task",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"connection": "SFTP",
"host": "",
"username": "",
"password": "",
"port": 21,
"request": "${b.output.file}"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Definition
Property | Type | Required | Description |
---|---|---|---|
The name (or type) of the task | |||
The unique name of the task in your job. It is used to reference this task in the workflow. | |||
The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW . | |||
true : the job continues if there is an error on this task. false : the job fails. | |||
Input parameters of the task. See below |
Inputs
Property | Description |
---|---|
connection | The protocol. Must be FTP or SFTP or FTPS. |
authenticationMethod | PASSWORD , PUBLIC_KEY Default: PASSWORD If connection is not SFTP and authenticationMethod is PUBLIC_KEY , the task fails. |
host | You can use a dns or an IP address. |
privateKey | The private key It is required to use a secret variable to store the private key. |
passphrase | The private key passphrase Only taken into account if authenticationMethod= PUBLIC_KEY . |
username | Username |
password | Password If connection is no SFTP , if connection is SFTP and password is set then an invalid input error is added |
port | Port |
request | A valid input. A file that defines which files must be moved and how. See the definition below. |
TIP
The supported private keys are the following :
---- BEGIN SSH2 PUBLIC KEY ----
-----BEGIN RSA PRIVATE KEY-----
-----BEGIN DSA PRIVATE KEY-----
-----BEGIN EC PRIVATE KEY-----
PuTTY-User-Key-File-2: (ssh-rsa)
PuTTY-User-Key-File-2: (ssh-dss)
-----BEGIN OPENSSH PRIVATE KEY-----
Input request
Example
xml
<Ftp-Move>
<File>
<Source-Path>/products-1.csv</Source-Path>
<Target-Path>/processed/products-1.csv</Target-Path>
</File>
<File>
<Source-Path>/sub-folder/products-2.csv</Source-Path>
<Target-Path>/processed/products-2.csv</Target-Path>
</File>
</Ftp-Move>
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
Definition
XPath | Description | Occurs |
---|---|---|
Ftp-Move | Root of the document | 1 |
./File | For each file. | 1..* |
./File/Source-Path | The exact file source path. Must starts with / | 1 |
./File/Target-Path | The exact file destination path. Must starts with / | 1 |
Outputs
Property | Type | Description |
---|---|---|
allFilesMoved | YES | NO . YES : all files have been sent. NO : at least one file has an error. |
Limits and additional notes
- The limitation of the input file size is 250 Mb.
- 100 files in the same folder (can be less depending on file sizes).
In addition to these limitations, the following practices are recommended:
- Always limit the number of files on a FTP folder
- Always create one folder for one type of file eg. never have a folder and a file at the same level of path.This way you can always use the Last file method to retrieve your file on the server.