Difference between revisions of "OS4X Enterprise - Job management"

From OS4X
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Requirements ==
 
== Requirements ==
In order to manage OS4X Enterprise jobs, OS4X Enterprise must be enabled via "Configuration" -> "OS4X Enterprise" -> "[[OS4X_Core_configuration#is_OS4X_Enterprise_installed.3F|Is OS4X Enterprise installed?]]". After enabling this checkbox, the menu on the left panel expands and the category "Jobs" contains "Send jobs" and "Receive jobs":
+
In order to manage OS4X Enterprise jobs, OS4X Enterprise must be enabled via "Configuration" -> "OS4X Enterprise" -> "[[OS4X_Core_configuration#is_OS4X_Enterprise_installed.3F|Is OS4X Enterprise installed?]]". After enabling this checkbox, the menu on the left panel expands and the category "Jobs" contains "Send jobs", "Receive jobs" and "All jobs":
  
 
[[Image:Os4x-menu-jobs.png]]
 
[[Image:Os4x-menu-jobs.png]]
Line 30: Line 30:
  
 
== Managing jobs interactively ==
 
== Managing jobs interactively ==
Given a job list (either send of receive jobs), the web interface shows a table of all jobs:
+
Given a job list (either send, receive or all jobs), the web interface shows a table of all jobs:
  
 
[[Image:Sample-joblist-receive-jobs.png]]
 
[[Image:Sample-joblist-receive-jobs.png]]
 +
 
The columns contain links to more actions:
 
The columns contain links to more actions:
*job number (left): link to job overview and management
+
*info icon (left): link to job overview and management
*date: -""-
 
 
*sender / receiver: all separate entities (recipient, department, location and partner) are links to the corresponding "edit" pages
 
*sender / receiver: all separate entities (recipient, department, location and partner) are links to the corresponding "edit" pages
 
*status: a link to display only jobs of exactly that status
 
*status: a link to display only jobs of exactly that status
  
The job status can be limited to a fine-grained search via the table below the job list:
+
=== Job details ===
 +
When clicking on the job info icon, the job details get displayed:
 +
 
 +
=== Details and actions ===
 +
[[Image:Job-view-details-and-actions.png]]
 +
 
 +
This part offers access to the "initial" and "actual" job XML for viewing, displaying in source and even editing the entries. These entries are saved in the database.
 +
*Actual XML: actual job description used for the next plugin execution of, for finished jobs, the last state of the job.
 +
*Initial XML: XML containing all information of the job at initial state. Used for restarting the job.
 +
 
 +
The XML entries are saved in the database table "<code>${tableprefix}xml_files</code>", where the ID ("<code>idx</code>") is the GET parameter of the link accessing the XML (when hovering with the mouse over the link, most browsers show the target link).
 +
 
 +
 
 +
The buttons have the following functions:
 +
*Restart: Restart the job, executing the recipient's plugin group from scratch
 +
**Outgoing jobs: restart the send plugin group of the recipient
 +
**Incoming jobs: restart the receive plugin group of the recipient
 +
*Cancel: set a cancel bit in the database to abort the job after the actual plugin being executed. If the actual plugin being executed is an asynchronous plugin, this asynchronous plugin will be executed with the parameter "''-c''" and the job number in order to let it abort cleanly. See [[OS4X_Server-side_plugin_philosophy|OS4X Server side plugin philosophy]].
 +
*Reload: actualize this overview.
 +
*Add comment: add a comment to the job's plugin logs.
 +
*Route: set a new recipient and start its receive plugin group.
 +
 
 +
==== Plugin status ====
 +
[[Image:Job-view-details-status.png]]
 +
 
 +
The actual plugin status shows the status of the job and, if in execution of a synchronous or asynchronous plugin, the actual plugin name.
 +
 
 +
==== Plugin logs (textual) ====
 +
[[Image:Job-view-details-plugin-logs-detail.png]]
 +
 
 +
When clicking on the "+" sign on the left below the graphical plugin logs, the textual plugin logs gets displayed with date of execution, plugin name, date, output and returncode of the plugin (where a value of zero "0" is successful/green, any other value shows an errornous red line).
 +
 
 +
==== XML view ====
 +
Displaying and editing XML entries of OS4X jobs is possible via links in the job detail view. There are three access modes available:
 +
*XML: interpreted form, formatted via a stylesheet saved in the database. This output is a human-readable view of the XML content. The default view contains a selected view of items; if all nodes are required, the icon "<i class="fa fa-eye" aria-hidden="true"></i> Show all nodes" is capable to view all nodes.
 +
[[Image:Job-actual-xml-html-view.png]]
 +
*source: Sourcecode of the XML for professional interpretation.
 +
[[Image:Job-actual-xml-source.png]]
 +
*edit: edit content of the XML saved in the database, mostly used to modify job information on-the-fly for later restarts.
 +
[[Image:Job-actual-xml-edit.png]]
 +
 
 +
== Managing jobs from command line ==
 +
Some handy functions are available to manage jobs without a GUI.
 +
 
 +
=== Restart job ===
 +
This binary "<code>[[os4xrestart]]</code>" is internally used by the web interface to restart jobs.
 +
 
 +
=== Cancel job ===
 +
The binary
 +
os4xcancel
 +
in the configured [[OS4X_Core_configuration#binary_installation_directory|binary installation directory]] sets a cancel bit in the database to abort the job after the actual plugin being executed. If the actual plugin being executed is an asynchronous plugin, this asynchronous plugin will be executed with the parameter "''-c''" and the job number in order to let it abort cleanly. See [[OS4X_Server-side_plugin_philosophy|OS4X Server side plugin philosophy]].
 +
 
 +
The only paramater is either the job number (in numeric format) or an XML file describing the OS4X job with a standard XML schema:
 +
<pre>
 +
os4xbox:bin haraldlatzko$ ./os4xcancel
 +
OS4X cancel plugin v1.0
 +
 
 +
Usage: ./os4xcancel <jobnumber|xml_file>
 +
</pre>
 +
This binary is internally used by the web interface.
  
[[Image:Joblist-status-select.png]]
 
  
When changing one entry of the table, the job list gets actualized dynamically.
+
[[Category:OS4X Enterprise]]

Latest revision as of 12:58, 11 April 2019

Requirements

In order to manage OS4X Enterprise jobs, OS4X Enterprise must be enabled via "Configuration" -> "OS4X Enterprise" -> "Is OS4X Enterprise installed?". After enabling this checkbox, the menu on the left panel expands and the category "Jobs" contains "Send jobs", "Receive jobs" and "All jobs":

Os4x-menu-jobs.png

Job types

Two job type exist:

  • incoming jobs
  • outgoing jobs

The two type of jobs differ in the selected plugin group used for plugin execution. The plugin groups used are:

Incoming jobs

The configured "default receive plugin group" is the first plugin group executed. The main task of this plugin group should to define a sender and/or recipient of this incoming job.

After this plugin group executed, the configured plugin group of the found recipient is being executed (this plugin group is intended to execute partner dependand logic), where the following logic is used:

  • if configured, use the configured receive plugin group of the recipient
  • if no recipient receive plugin group is configured, use the receive plugin group of the department
  • if no department receive plugin group is configured, use the receive plugin group of the location
  • if no location receive plugin group is configured, use the receive plugin group of the partner
  • if no partner receive plugin group is configured, set the job to aborted and log this in the plugin logs stating that there is no receive plugin group defined.

Outgoing jobs

The configured send plugin group of the recipient of the send job is executed, using the following logic:

  • if configured, use the configured send plugin group of the recipient of the job
  • if no recipient send plugin group is configured, use the send plugin group of the department
  • if no department send plugin group is configured, use the send plugin group of the location
  • if no location send plugin group is configured, use the send plugin group of the partner
  • if no partner send plugin group is configured, set the job to aborted and log this in the plugin logs stating that there is no send plugin group defined.

Managing jobs interactively

Given a job list (either send, receive or all jobs), the web interface shows a table of all jobs:

Sample-joblist-receive-jobs.png

The columns contain links to more actions:

  • info icon (left): link to job overview and management
  • sender / receiver: all separate entities (recipient, department, location and partner) are links to the corresponding "edit" pages
  • status: a link to display only jobs of exactly that status

Job details

When clicking on the job info icon, the job details get displayed:

Details and actions

Job-view-details-and-actions.png

This part offers access to the "initial" and "actual" job XML for viewing, displaying in source and even editing the entries. These entries are saved in the database.

  • Actual XML: actual job description used for the next plugin execution of, for finished jobs, the last state of the job.
  • Initial XML: XML containing all information of the job at initial state. Used for restarting the job.

The XML entries are saved in the database table "${tableprefix}xml_files", where the ID ("idx") is the GET parameter of the link accessing the XML (when hovering with the mouse over the link, most browsers show the target link).


The buttons have the following functions:

  • Restart: Restart the job, executing the recipient's plugin group from scratch
    • Outgoing jobs: restart the send plugin group of the recipient
    • Incoming jobs: restart the receive plugin group of the recipient
  • Cancel: set a cancel bit in the database to abort the job after the actual plugin being executed. If the actual plugin being executed is an asynchronous plugin, this asynchronous plugin will be executed with the parameter "-c" and the job number in order to let it abort cleanly. See OS4X Server side plugin philosophy.
  • Reload: actualize this overview.
  • Add comment: add a comment to the job's plugin logs.
  • Route: set a new recipient and start its receive plugin group.

Plugin status

Job-view-details-status.png

The actual plugin status shows the status of the job and, if in execution of a synchronous or asynchronous plugin, the actual plugin name.

Plugin logs (textual)

Job-view-details-plugin-logs-detail.png

When clicking on the "+" sign on the left below the graphical plugin logs, the textual plugin logs gets displayed with date of execution, plugin name, date, output and returncode of the plugin (where a value of zero "0" is successful/green, any other value shows an errornous red line).

XML view

Displaying and editing XML entries of OS4X jobs is possible via links in the job detail view. There are three access modes available:

  • XML: interpreted form, formatted via a stylesheet saved in the database. This output is a human-readable view of the XML content. The default view contains a selected view of items; if all nodes are required, the icon " Show all nodes" is capable to view all nodes.

Job-actual-xml-html-view.png

  • source: Sourcecode of the XML for professional interpretation.

Job-actual-xml-source.png

  • edit: edit content of the XML saved in the database, mostly used to modify job information on-the-fly for later restarts.

Job-actual-xml-edit.png

Managing jobs from command line

Some handy functions are available to manage jobs without a GUI.

Restart job

This binary "os4xrestart" is internally used by the web interface to restart jobs.

Cancel job

The binary

os4xcancel

in the configured binary installation directory sets a cancel bit in the database to abort the job after the actual plugin being executed. If the actual plugin being executed is an asynchronous plugin, this asynchronous plugin will be executed with the parameter "-c" and the job number in order to let it abort cleanly. See OS4X Server side plugin philosophy.

The only paramater is either the job number (in numeric format) or an XML file describing the OS4X job with a standard XML schema:

os4xbox:bin haraldlatzko$ ./os4xcancel 
OS4X cancel plugin v1.0

Usage: ./os4xcancel <jobnumber|xml_file>

This binary is internally used by the web interface.