Seon plugin seonplugin scp upload
From Seon
Purpose
For simple SCP/SFTP upload tasks, this plugin can transfer all job files to a target SCP/SFTP server.
Configuration
The plugin must be configured on per-partner level and has no global configuration.
Configuration parameters are:
- Target server: server hostname or IP address of SSH server being addressed.
- SCP port: default port 22, but can be changed to any valid TCP/IP port on which the remote SSH server is listening.
- Target path: target path where to upload files to.
- Username: username which is being authentificated at the remote server.
- Password: plaintext password (if available) for the user being authentificated.
- Key file: absolute path to the SSH key file of the user being authentificated.
- Debug output: enable more debug output for analyzing transmission problems.
- Enable SCP mode: If SFTP is not available, plain SCP mode can be activated with this option. Beware: enabling this option disabled the support of directory structures on remote site.
The target directory may contain variables, which are resolved at runtime of the plugin. The list of usable variables is:
- %j: job number
- %d: day of job creation (two digits)
- %m: month of job creation (two digits)
- %Y: year of job creation (four digits)
- %H: hour of job creation (two digits, 24h format)
- %M: minute of job creation (two digits)
- %S: second of job creation (two digits)
- %D: job direction (either "
incoming
" or "outgoing
") - %r: recipient partner shortname
- %s: sender partner shortname
- %t: recipient location
- %u: recipient department
- %v: recipient name
- %w: recipient last name
- %x: recipient address code
- %g: sender location
- %h: sender department
- %i: sender name
- %J: sender last name
- %k: sender address code
- %e: depending on the job direction, the partner shortname of the external communication partner
- for incoming jobs: sender partner shortname (see "
%s
") - job outgoing (or undefined job directions): recipient partner shortname (see "
%r
")
- for incoming jobs: sender partner shortname (see "
- %a: ENGDAT Message Reference [UNH0062] (if given, otherwise empty)
- %b: ENGDAT Document Number [MID1004] (if given, otherwise empty)
Since Seon Build 20180129 the following variables are available:
- %p: sender partner's event parameter
- %P: recipient partner's event parameter
- %Q: depending on the job direction, the event parameter of the external communication partner:
- incoming jobs: sender's event parameter (= "
%p
") - outgoing jobs or undefined job direction: recipient's company shortname (= "
%P
")
- incoming jobs: sender's event parameter (= "
Behaviour
The plugin loops over all files of the job and handles them separately (one after another). For each file, the plugin
- Connects to the SSH server
- Uploads the file to the target directory with its absolute filename. The local filename is being analyzed if a "job directory" exists for this job. If it exists, the file is being translated into a path without the job directory, so subdirectories at remote side are possible (i.e. when extracting a ZIP archive with subdirectories before transmission). If no job directory definition exists, the basename of the file is being used.