Seon Enterprise - Job management

From Seon
Revision as of 13:58, 8 August 2017 by Admin (talk | contribs) (Restart job)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Requirements

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

Seon-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 of receive 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 Seon 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 Seon 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.

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 "seonrestart" is internally used by the web interface to restart jobs.

Cancel job

The binary

seoncancel

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 Seon Server side plugin philosophy.

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

seonbox:bin haraldlatzko$ ./seoncancel 
Seon cancel plugin v1.0

Usage: ./seoncancel <jobnumber|xml_file>

This binary is internally used by the web interface.