Difference between revisions of "Os4x create enterprise sendjob"

From OS4X
Jump to navigation Jump to search
Line 14: Line 14:
 
=== Sender and recipient ===
 
=== 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).
 
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 adding the recipient node several times, the tool will create several send jobs for every single 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 OS4X 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 OS4X 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).
  
 
== Formatting the information ==
 
== Formatting the information ==

Revision as of 14:11, 1 April 2011

Create OS4X Enterprise send jobs in batch mode

OS4X 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.

What you need

As a minimum, you need the following information:

  • sender of the job
    • username (must be unique) - or
    • database index value
  • at least 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 adding the recipient node several times, the tool will create several send jobs for every single 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 OS4X 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 OS4X 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).

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"?>
<OS4X_sendjob>
    <job_comment/>
    <sender>
        <index>3</index>
        <username></username>
    </sender>
    <recipient>
        <index></index>
        <username>haraldlatzko</username>
    </recipient>
    <job_file>
      <filename>os4xlic</filename>
      <absolute_filename>/opt/os4x/bin/os4xlic</absolute_filename>
      <file_comment>filecomment</file_comment>
      <compression/>
      <plugin_output/>
    </job_file>
    <job_file>
      <filename>os4x_licinfo</filename>
      <absolute_filename>/opt/os4x/bin/os4x_licinfo</absolute_filename>
      <file_comment>filecomment</file_comment>
      <compression/>
      <plugin_output/>
    </job_file>
</OS4X_sendjob>

Execution syntax

(t.b.d.)