Difference between revisions of "Seon plugin seonplugin filecopy"

From Seon
Jump to: navigation, search
 
Line 1: Line 1:
 
[[Category:Plugins]]
 
[[Category:Plugins]]
== Zweck ==
+
== Puropose ==
  
Kopieren aller Dateien des Auftrags in ein definiertes Verzeichnis. Dabei gilt folgende Regelung:
+
Copy all files of a job into a defined target directory. The default assumption is:
*<[[Seon Core configuration#data_incoming_directory|data incoming directory]]>/<jobnummer> für eingehende Jobs
+
*<[[Seon Core configuration#data_incoming_directory|data incoming directory]]>/<jobnummer> for incoming jobs
*<[[Seon Core configuration#data_outgoing_directory|data_outgoing_directory]]>/<jobnummer> für ausgehende oder unbekannte Jobs
+
*<[[Seon Core configuration#data_outgoing_directory|data_outgoing_directory]]>/<jobnummer> for outgoing or jobs of unknown type
  
== Voraussetzungen ==
+
== Requirements ==
  
* Datei <code>/etc/seon.conf</code> bzw. Konfigurationsdatei in der Umgebungsvariable <code>$Seon_CFGFILE</code> definiert. Über die Datenbank, die hier konfiguriert ist, wird das temporäre Verzeichnis sowie das Lizenzfile bezogen.  
+
* 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.).
  
== Konfiguration ==
+
== Configuration ==
  
Es kann ein Zielverzeichnis vergeben werden, wenn die Defaultwerte (s.o.) nicht genutzt werden sollen. Beachten Sie, dass für jede Hierarchie-Ebene an Adressinformation (also Firma, Standort, Abteilung oder Zielperson selbst) unterschiedlich sein kann. Das Zielverzeichnis kann Variablen enthalten, welche zur Laufzeit des Plugins aufgelöst werden.
+
The target filename 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.
  
Die nutzbaren Variablen sind:
+
The usable variables are:
*%j: Jobnummer
+
*%j: job number
*%d: Tag der Joberzeugung (zweistellig)
+
*%d: day of job creation (two digits)
*%m: Monat der Joberzeugung (zweistellig)
+
*%m: month of job creation (two digits)
*%Y: Jahr der Joberzeugung (vierstellig)
+
*%Y: year of job creation (four digits)
*%H: Stunde der Joberzeugung (zweistellig, 24h-Format)
+
*%H: hour of job creation (two digits, 24h format)
*%M: Minute der Joberzeugung (zweistellig)
+
*%M: minute of job creation (two digits)
*%S: Sekunde der Joberzeugung (zweistellig)
+
*%S: second of job creation (two digits)
*%D: Richtung (derzeit entweder "<code>incoming</code>" oder "<code>outgoing</code>")
+
*%D: job direction: "<code>incoming</code>" or "<code>outgoing</code>"
*%r: Empfänger-Firmenkurzname
+
*%r: recipient partner shortname
*%s: Sender-Firmenkurzname
+
*%s: sender partner shortname
*%t: Empfänger Standortname
+
*%t: recipient location name
*%u: Empfänger Abteilungsname
+
*%u: recipient department name
*%v: Empfänger Vorname
+
*%v: recipient first name
*%w: Empfänger Nachname
+
*%w: recipient family name
*%x: Empfänger Adresscode
+
*%x: recipient address code
*%g: Sender Standortname
+
*%g: sender location name
*%h: Sender Abteilungsname
+
*%h: sender department name
*%i: Sender Vorname
+
*%i: sender first name
*%J: Sender Nachname
+
*%J: sender family name
*%k: Sender Adresscode
+
*%k: sender address code
  
Seit Seon 3 Build 20140227 ist folgende Variable nutzbar:
+
Since Seon 3 Build 20140227 the following variable is available:
*%e: Abhängig von der Auftrags-Richtung, ist diese Variable der Firmenkurzname des externen Kommunikationspartners:
+
*%e: depending on the job direction, the company shortname of the external communication partner:
**bei Eingangs-Aufträgen: Sender-Firmenkurzname (analog "<code>%s</code>")
+
**incoming jobs: sender's company shortname (= "<code>%s</code>")
**bei Ausgangs-Aufträgen (oder nicht definierbarer Auftrags-Richtung): Empfänger-Firmenkurzname(analog "<code>%r</code>")
+
**outgoing jobs or undefined job direction: recipient's company shortname (= "<code>%r</code>")
  
== Beispiele ==
+
Since Seon 3 Build 201508117 the following variables are available:
Alle Beispiele basieren auf einem Seon-Sendeauftrag mit der Nummer 76 von und an Firma "c-works"
+
*%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)
 +
 
 +
== 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/
wird zu:
+
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
wird zu:
+
renders to:
 
  /opt/seon/tmp/outgoing/c-works/76
 
  /opt/seon/tmp/outgoing/c-works/76
----
 
Ein SWAN-ähnliches Konstrukt wäre z.B.:
 
/opt/seon/data/%Y/%m/%d/%j
 
welches aufgelöst wird zu:
 
/opt/seon/data/2008/03/18/76
 
 
== Rückgabewerte ==
 
0: alles OK
 
 
1: Configfile (/etc/seon.conf bzw. Inhalt der Variable "<code>Seon_CFGFILE</code>") kann nicht gelesen werden oder die hier konfigurierte Datenbank kann nicht verbunden werden
 
 
2: Lizenzfehler
 
 
3: XML-Parameterfile kann nicht geparsed werden
 
  
4: Datei(en) konnten nicht kopiert werden
+
== 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 copied

Latest revision as of 07:41, 3 November 2017

Puropose

Copy all files of a job into a defined target directory. The default assumption is:

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 filename 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")

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)

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 copied