Scope
- Components for dependency handling
- Download & Deployment information
Download & Deployment
- JobScheduler
FEATURE AVAILABILITY STARTING FROM RELEASE 1.7 FEATURE AVAILABILITY ENDING WITH RELEASE 1.8
- This feature requires Java 1.7 to be available. It will not work with Java 1.8 and therefore not with JobScheduler releases starting from 1.9.
- Dependency
- Attached archive contains the below mentioned files for the
dependency
folder: dependency.zip - The archive should be extracted to a subfolder of the JobScheduler
live/sos
directory, i.e.$SCHEDULER_DATA/config/live/sos/dependency
.
- Attached archive contains the below mentioned files for the
Global Setting: scheduler.ignore_sync_jobs_in_stopped_jobchains
- Dependency handling requires the new option
scheduler.ignore_sync_jobs_in_stopped_jobchains
Enabling this option by setting the scheduler variable in the configuration file
$SCHEDULER_DATA/scheduler.xml
totrue
will ignore synchronization nodes that are part of stopped job chains for all instances of synchronization jobs.Configuration in file scheduler.xml<spooler> <config> <param name="scheduler.ignore_sync_jobs_in_stopped_jobchains" value="true"/> ...
It is also possible to enable this option per job by adding a job parameter like this:
Configuration by job parameter<job order="yes"> <params > <param name="scheduler.ignore_sync_jobs_in_stopped_jobchains" value="true"/> </params> ...
Folder: dependency
- This folder provides the components required to implement dependency handling.
- This folder should be located below the JobScheduler
live
directory.
Function Set: dependency.js
- This function set provides basic capabilities for dependency checking
- This function set is used by the following job Monitor Scripts:
jobnet_check_predecessor.js
jobnet_check_successor.js
Job: jobnet_check_predecessor.job.xml
Usage
- Sample job for a job step that provides dependency checking.
- This job is added to the beginning of a job chain.
- This job step is added the job node state
jobnet_start.
Sample
Job Implementation
- The job implements an arbitrary job body.
- Dependency handling is implemented by the Monitor Script.
- The Monitor Script includes two files:
jobnet_check_predecessor.js
dependency.js
- When creating individual job implementations then no invidual implementation of the Monitor Script should be effected but the below-mentioned script files should be included as they are subject to future improvement.
- The Monitor Script includes two files:
- The Monitor Script makes use of the function set provided by the file
dependency.js
in order to handle dependencies for predecessor job chains. - The Monitor Script checks predecessor job chains in order to decide if the current job chain should be executed or if its execution shoud be postponed..
Job: jobnet_check_successor.job.xml
Usage
- Sample job for a job step that provides dependency checking.
- This job is added to the end of a job chain.
- This job step is added the job node state
jobnet_end
.
Sample
- see job
jobnet_check_successor
from the above screenshot
Job Implementation
- This job implements an arbitrary job body.
- Dependency handling is implemented by the Monitor Script.
- The Monitor Script includes two files:
jobnet_check_successor.js
dependency.js
- When creating individual job implementations then no invidual implementation of the Monitor Script should be effected but the below-mentioned script files should be included as they are subject to future improvement.
- The Monitor Script includes two files:
- The Monitor Script makes use of the function set provided by the file
dependency.js
in order to handle dependencies for successor job chains. - The Monitor Scripts starts successor job chains if applicable.
Components for Job Chain Resets
- The following components are included with the folder
dependency
Job Chain: jobnet_reset_job_chains.job_chain.xml
- The job chain makes use of only one job
jobnet_reset_job_chains.job.xml
, see below.
Job: jobnet_reset_job_chains.job.xml
Usage
- Standard job that is used to toggle the state of job chains for dependency checking. Job chains present one of these states:
running
: the job chain is active and dependency checking is performedstopped
: the job chain is inactive, no dependency checking is performed.
Job Implementation
- This job implements the operations to toggle the state of one or multiple job chains.
- The effective processing is implemented by JavaScript.
- The JavaScript implementation:
Order: jobnet_reset_job_chains.order.xml
- This is a sample order that shows how job chains could be selected for activation and deactivation.
- Parameters
operation
: the toggling operation- Values
activate
: modify the state of stopped job chains torunning
deactivate
: modify the state of running job chains tostopped
- Default Value
activate
- Values
input_list
:- Values
- A comma separated list of job chain paths
- Default Value
- none
- Values
input_file
:- Values
- the location of a file that contains one job chain path per line
- Default Value
- none
- Values
- Behaviour
- Without parameters being specified all job chains will be activated.
- Without the parameters
input_list
andinput_file
being specified the operation is applied to all job chains. - Should in addition to the parameter
input_list
the parameter aninput_file
be specified then both specifications of job chains are merged.
Notes
- Dependency Hnandling Scripts and Monitor Scripts are
- implemented for the Rhino scripting engine up to Java 1.7 with JobScheduler release 1.7 and 1.8.
- not available with the Nashorn engine that is introduced with Java 1.8 and is required for JobScheduler release 1.9.