Difference between revisions of "Seon plugin seonplugin filemove"
From Seon
(→Konfiguration) |
(→Configuration) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == | + | [[Category:Plugins]] |
+ | == Puropose == | ||
− | + | Move all files of a job into a defined target directory. The default assumption is: | |
− | *<[[Seon Core configuration#data_incoming_directory|data incoming directory]]>/<jobnummer> | + | *<[[Seon Core configuration#data_incoming_directory|data incoming directory]]>/<jobnummer> for incoming jobs |
− | *<[[Seon Core configuration#data_outgoing_directory|data_outgoing_directory]]>/<jobnummer> | + | *<[[Seon Core configuration#data_outgoing_directory|data_outgoing_directory]]>/<jobnummer> for outgoing or jobs of unknown type |
− | == | + | == Requirements == |
− | * | + | * File <code>/etc/seon.conf</code> or configuration file pointed to in environment variable <code>$Seon_CFGFILE</code>. Via the used configuration file, the information are retrieved used by the plugin (such as default configuration etc.). |
− | == | + | == Configuration == |
− | + | The target directory can be set up to contain variables. These variables are exchanged by runtime information of the Seon job, in which context the plugin is run. | |
− | + | The usable variables are: | |
− | *%j: | + | *%j: job number |
− | *%d: | + | *%d: day of job creation (two digits) |
− | *%m: | + | *%m: month of job creation (two digits) |
− | *%Y: | + | *%Y: year of job creation (four digits) |
− | *%H: | + | *%H: hour of job creation (two digits, 24h format) |
− | *%M: | + | *%M: minute of job creation (two digits) |
− | *%S: | + | *%S: second of job creation (two digits) |
− | *%D: | + | *%D: job direction: "<code>incoming</code>" or "<code>outgoing</code>" |
− | *%r: | + | *%r: recipient partner shortname |
− | *%s: | + | *%s: sender partner shortname |
+ | *%t: recipient location name | ||
+ | *%u: recipient department name | ||
+ | *%v: recipient first name | ||
+ | *%w: recipient family name | ||
+ | *%x: recipient address code | ||
+ | *%g: sender location name | ||
+ | *%h: sender department name | ||
+ | *%i: sender first name | ||
+ | *%J: sender family name | ||
+ | *%k: sender address code | ||
− | + | Since Seon 3 Build 20140227 the following variable is available: | |
− | *% | + | *%e: depending on the job direction, the company shortname of the external communication partner: |
− | + | **incoming jobs: sender's company shortname (= "<code>%s</code>") | |
− | * | + | **outgoing jobs or undefined job direction: recipient's company shortname (= "<code>%r</code>") |
− | * | ||
− | |||
− | * | ||
− | * | ||
− | |||
− | |||
− | |||
− | == | + | Since Seon 3 Build 201508117 the following variables are available: |
− | + | *%a: ENGDAT Message Reference [UNH0062] (if available, otherwise empty) | |
+ | *%b: ENGDAT Document Number [MID1004] (if available, otherwise empty) | ||
+ | |||
+ | Since Seon 3 Build 20160407 the following variables are available: | ||
+ | *%y: recipient's username ("unknown" if empty) | ||
+ | *%l: sender's username ("unknown" if 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 (= "<code>%p</code>") | ||
+ | **outgoing jobs or undefined job direction: recipient's company shortname (= "<code>%P</code>") | ||
+ | |||
+ | == Examples == | ||
+ | All examples rely on an outgoing job 76 from and to the company "c-works" | ||
/opt/seon/tmp/%r/seon_job_%j/ | /opt/seon/tmp/%r/seon_job_%j/ | ||
− | + | renders to: | |
/opt/seon/tmp/c-works/seon_job_76 | /opt/seon/tmp/c-works/seon_job_76 | ||
---- | ---- | ||
/opt/seon/tmp/%D/%r/%j | /opt/seon/tmp/%D/%r/%j | ||
− | + | renders to: | |
/opt/seon/tmp/outgoing/c-works/76 | /opt/seon/tmp/outgoing/c-works/76 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | 3: XML | + | == Return values == |
+ | *0: everything OK | ||
+ | *1: Configfile (/etc/seon.conf or value of environment variable "<code>Seon_CFGFILE</code>", read in as file) cannot be found or database unavailable. | ||
+ | *2: License error | ||
+ | *3: XML parameter file cannot be parsed | ||
+ | *4: Files cannot be moved |
Latest revision as of 09:44, 30 January 2018
Puropose
Move all files of a job into a defined target directory. The default assumption is:
- <data incoming directory>/<jobnummer> for incoming jobs
- <data_outgoing_directory>/<jobnummer> for outgoing or jobs of unknown type
Requirements
- File
/etc/seon.conf
or configuration file pointed to in environment variable$Seon_CFGFILE
. Via the used configuration file, the information are retrieved used by the plugin (such as default configuration etc.).
Configuration
The target directory can be set up to contain variables. These variables are exchanged by runtime information of the Seon job, in which context the plugin is run.
The usable variables are:
- %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: "
incoming
" or "outgoing
" - %r: recipient partner shortname
- %s: sender partner shortname
- %t: recipient location name
- %u: recipient department name
- %v: recipient first name
- %w: recipient family name
- %x: recipient address code
- %g: sender location name
- %h: sender department name
- %i: sender first name
- %J: sender family name
- %k: sender address code
Since Seon 3 Build 20140227 the following variable is available:
- %e: depending on the job direction, the company shortname of the external communication partner:
- incoming jobs: sender's company shortname (= "
%s
") - outgoing jobs or undefined job direction: recipient's company shortname (= "
%r
")
- incoming jobs: sender's company shortname (= "
Since Seon 3 Build 201508117 the following variables are available:
- %a: ENGDAT Message Reference [UNH0062] (if available, otherwise empty)
- %b: ENGDAT Document Number [MID1004] (if available, otherwise empty)
Since Seon 3 Build 20160407 the following variables are available:
- %y: recipient's username ("unknown" if empty)
- %l: sender's username ("unknown" if 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 (= "
Examples
All examples rely on an outgoing job 76 from and to the company "c-works"
/opt/seon/tmp/%r/seon_job_%j/
renders to:
/opt/seon/tmp/c-works/seon_job_76
/opt/seon/tmp/%D/%r/%j
renders to:
/opt/seon/tmp/outgoing/c-works/76
Return values
- 0: everything OK
- 1: Configfile (/etc/seon.conf or value of environment variable "
Seon_CFGFILE
", read in as file) cannot be found or database unavailable. - 2: License error
- 3: XML parameter file cannot be parsed
- 4: Files cannot be moved