Difference between revisions of "Seon create enterprise sendjob"

From Seon
Jump to: navigation, search
(Formatting the information)
(Formatting the information)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Create Seon Enterprise send jobs in batch mode =
 
= Create Seon Enterprise send jobs in batch mode =
 
Seon Enterprise offers a wide range to automatism, and incoming jobs execute configurable plugins dynamically depending on the recipient. But what about outgoing jobs? That's where this tools fills the gap.
 
Seon Enterprise offers a wide range to automatism, and incoming jobs execute configurable plugins dynamically depending on the recipient. But what about outgoing jobs? That's where this tools fills the gap.
 +
 +
Executing the binary is possible with a valid Seon Enterprise and Seon Enterprise Lite license.
  
 
== What you need ==
 
== What you need ==
Line 28: Line 30:
 
*compression: depending on your recipient, you may add an information about how the file is being compressed. This attribute may be overwritten by compression plugins in the Seon job process lifecycle.
 
*compression: depending on your recipient, you may add an information about how the file is being compressed. This attribute may be overwritten by compression plugins in the Seon job process lifecycle.
 
*plugin_output: Files may be created by plugins or tools, which may create their own output (such as converts, exporters etc.). This node may contain textual information for the file (which may be analyzed by another plugin for further tasks).
 
*plugin_output: Files may be created by plugins or tools, which may create their own output (such as converts, exporters etc.). This node may contain textual information for the file (which may be analyzed by another plugin for further tasks).
 +
*seoneq_params: an optional string containing parameters used for enqueueing files to the Seon send queue (see parameters of program "[[Seon_Core_binaries#seoneq|seoneq]]"). Supported parameters are (generally spoken) all other than "<code>-p</code>", "<code>-f</code>", "<code>-v</code>", "<code>-c</code>", "<code>-i</code>" and "<code>-j</code>".
  
 
== Formatting the information ==
 
== Formatting the information ==
Line 54: Line 57:
 
       <filename>seon_licinfo</filename>
 
       <filename>seon_licinfo</filename>
 
       <absolute_filename>/opt/seon/bin/seon_licinfo</absolute_filename>
 
       <absolute_filename>/opt/seon/bin/seon_licinfo</absolute_filename>
       <file_comment>filecomment</file_comment>
+
       <file_comment>Filetransmitted with fixed record length of 128 bytes</file_comment>
 
       <compression/>
 
       <compression/>
 
       <plugin_output/>
 
       <plugin_output/>
 +
      <seoneq_params>-F 128</seoneq_params>
 
     </job_file>
 
     </job_file>
 
</Seon_sendjob>
 
</Seon_sendjob>
Line 76: Line 80:
 
The parameters are:
 
The parameters are:
 
*-C: optional config file in case you don't want to use the default "<code>/etc/seon.con</code>"
 
*-C: optional config file in case you don't want to use the default "<code>/etc/seon.con</code>"
*-i: the server ID overriding the configured one in "<code>/etc/seon.con</code>"
+
*-i: the server ID overriding the configured one in "<code>/etc/seon.conf</code>"
 
*-x: the above described XML file
 
*-x: the above described XML file
 
*-d: verbose mode, don't run any program in the background, display more information
 
*-d: verbose mode, don't run any program in the background, display more information
  
=== Example ===
+
=== Examples ===
The examples are using the XML file from above. A valid user exists in the database.
+
These examples are using the XML file from above. The user "test" exists in the databse, also the recipient user with the database index value "3".
  
 
==== Sending two file from user "test" to user "test" ====
 
==== Sending two file from user "test" to user "test" ====
 
<pre>
 
<pre>
imac-i7:bin seon$ ./seon_create_enterprise_sendjob -x /tmp/seon-1.xml
+
imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -x /tmp/seon-1.xml
 
</pre>
 
</pre>
 
No more output will be written.
 
No more output will be written.
Line 91: Line 95:
 
==== Sending two file from user "test" to user "test" with verbose output ====
 
==== Sending two file from user "test" to user "test" with verbose output ====
 
<pre>
 
<pre>
imac-i7:bin seon$ ./seon_create_enterprise_sendjob -d -x /tmp/seon-1.xml
+
imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -d -x /tmp/seon-1.xml
 
License valid
 
License valid
 
Enabled verbose mode
 
Enabled verbose mode
Line 97: Line 101:
 
  found file: [seonlic] -> [/opt/seon/bin/seonlic]
 
  found file: [seonlic] -> [/opt/seon/bin/seonlic]
 
  found file: [seon_licinfo] -> [/opt/seon/bin/seon_licinfo]
 
  found file: [seon_licinfo] -> [/opt/seon/bin/seon_licinfo]
 +
* Seon Enterprise job number: 631
 
* executing plugin [filetype recognizer]... OK
 
* executing plugin [filetype recognizer]... OK
 
* executing plugin [ENGDAT v2 encode]... OK
 
* executing plugin [ENGDAT v2 encode]... OK
 
* executing plugin [enqueue to Seon]... OK
 
* executing plugin [enqueue to Seon]... OK
 
</pre>
 
</pre>
 +
 +
==== Sending two file from user "test" to user a recipient without a configured send plugin group, with verbose output ====
 +
 +
<pre>
 +
imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -d -x /tmp/seon-3.xml
 +
License valid
 +
Enabled verbose mode
 +
parsing XML file '/tmp/seon-3.xml'
 +
found file: [seonlic] -> [/opt/seon/bin/seonlic]
 +
found file: [seon_licinfo] -> [/opt/seon/bin/seon_licinfo]
 +
* Seon Enterprise job number: 638
 +
ERROR: No plugin group defined as send plugin group for recipient -> aborting job.
 +
</pre>
 +
An Seon send job has been created with the ID 638, but it has reached the status "aborted". You may reconfigure the corresponding recipient (i.e. at company level) and restart the job.

Latest revision as of 14:41, 4 December 2014

Create Seon Enterprise send jobs in batch mode

Seon Enterprise offers a wide range to automatism, and incoming jobs execute configurable plugins dynamically depending on the recipient. But what about outgoing jobs? That's where this tools fills the gap.

Executing the binary is possible with a valid Seon Enterprise and Seon Enterprise Lite license.

What you need

As a minimum, you need the following information:

  • sender of the job
    • username (must be unique) - or
    • database index value
  • exactly one recipient
    • username (must be unique) - or
    • database index value
  • file(s)

Sender and recipient

Setting a sender or recipient is possible either via the username or the database index value of the person. When used, the username must be unique. If more than one username is found, execution fails. If a numeric index value is given, it will supersede the username information (even is given).

When no valid sender information is given in the XML, the user executing the binary will be searched in the database and set as the actual sender of the job.

When adding the recipient node several times, the toll will send a single to job the first recipient.

File(s)

Files can occur as often as you want. The must-have information are:

  • filename: The name of the file on the creating side. It may be different than the absolute filename given below. This will give you the chance to handle files with different names in the filesystem logically with another filename in Seon jobs.
  • absolute_filename: The absolute path of the readable file in the filesystem.

Optionally, you can add:

  • file_comment: Any textual comment to the file. This will normally added to the ENGDAT abstract file for outgoing ENGDAT jobs.
  • compression: depending on your recipient, you may add an information about how the file is being compressed. This attribute may be overwritten by compression plugins in the Seon job process lifecycle.
  • plugin_output: Files may be created by plugins or tools, which may create their own output (such as converts, exporters etc.). This node may contain textual information for the file (which may be analyzed by another plugin for further tasks).
  • seoneq_params: an optional string containing parameters used for enqueueing files to the Seon send queue (see parameters of program "seoneq"). Supported parameters are (generally spoken) all other than "-p", "-f", "-v", "-c", "-i" and "-j".

Formatting the information

The most platform independant and dynamic format is XML. In this case, the tools expects a XML file which contains some well-defined nodes. Example:

<?xml version="1.0" encoding="UTF-8"?>
<Seon_sendjob>
    <job_comment/>
    <sender>
        <index>3</index>
        <username></username>
    </sender>
    <recipient>
        <index></index>
        <username>test</username>
    </recipient>
    <job_file>
      <filename>seonlic</filename>
      <absolute_filename>/opt/seon/bin/seonlic</absolute_filename>
      <file_comment>filecomment</file_comment>
      <compression/>
      <plugin_output/>
    </job_file>
    <job_file>
      <filename>seon_licinfo</filename>
      <absolute_filename>/opt/seon/bin/seon_licinfo</absolute_filename>
      <file_comment>Filetransmitted with fixed record length of 128 bytes</file_comment>
      <compression/>
      <plugin_output/>
      <seoneq_params>-F 128</seoneq_params>
    </job_file>
</Seon_sendjob>

Execution syntax

When executing the binary without any parameters or with parameter "-h", the parameter help is being displayed:

imac-i7:bin seon$ ./seon_create_enterprise_sendjob -h
Seon create enterprise send job v1.2

usage:
-h: print this help text
-C <configfile>: use given config file (default: /etc/seon.conf)
-i <serverID>: start as server with ID <serverID> (default: 0)
-x <XML file>: XML file describing a send job, see online help for details
-d: verbose mode (don't daemonize)

The parameters are:

  • -C: optional config file in case you don't want to use the default "/etc/seon.con"
  • -i: the server ID overriding the configured one in "/etc/seon.conf"
  • -x: the above described XML file
  • -d: verbose mode, don't run any program in the background, display more information

Examples

These examples are using the XML file from above. The user "test" exists in the databse, also the recipient user with the database index value "3".

Sending two file from user "test" to user "test"

imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -x /tmp/seon-1.xml

No more output will be written.

Sending two file from user "test" to user "test" with verbose output

imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -d -x /tmp/seon-1.xml
License valid
Enabled verbose mode
parsing XML file '/tmp/seon-1.xml'
 found file: [seonlic] -> [/opt/seon/bin/seonlic]
 found file: [seon_licinfo] -> [/opt/seon/bin/seon_licinfo]
* Seon Enterprise job number: 631
* executing plugin [filetype recognizer]... OK
* executing plugin [ENGDAT v2 encode]... OK
* executing plugin [enqueue to Seon]... OK

Sending two file from user "test" to user a recipient without a configured send plugin group, with verbose output

imac-i7:bin seon$ /opt/seon/bin/seon_create_enterprise_sendjob -d -x /tmp/seon-3.xml
License valid
Enabled verbose mode
parsing XML file '/tmp/seon-3.xml'
 found file: [seonlic] -> [/opt/seon/bin/seonlic]
 found file: [seon_licinfo] -> [/opt/seon/bin/seon_licinfo]
* Seon Enterprise job number: 638
ERROR: No plugin group defined as send plugin group for recipient -> aborting job.

An Seon send job has been created with the ID 638, but it has reached the status "aborted". You may reconfigure the corresponding recipient (i.e. at company level) and restart the job.