Skip to end of metadata
Go to start of metadata

Scope

  • JobScheduler implements the concept of a "critical path", i.e. the fact that in case of time constraints some less critical jobs should be skipped during daily or nightly processing.
  • This article introduces the solution for JobScheduler.

Download & Installation

  • FEATURE AVAILABILITY STARTING FROM RELEASE 1.9
    • Starting with this release this feature is included with the JobScheduler setup.
    • For previous releases please use the below downloads.
  • Download the unpack the archive:
  • Installation
      • Java JAR files
        • user_lib/com.sos-berlin.jitl.criticalpath-0.1.jar
          • copy this file to the <scheduler_home>/lib/user_lib folder. If this folder not exists, copy the file to the <scheduler_home>/lib folder directly.
      • Job Documentation
        • jobs/JobSchedulerCriticalPathUncriticalJobNodes.xml
          • copy this file to <scheduler_install>/jobs
      • Job Object Folder
        • config/live/sos/operations/criticalpath
          • copy this folder to <scheduler_install>/config/live/sos/operations/criticalpath

Explanations

Job Chain sos/operations/criticalpath/UncriticalJobNodes

The functionality includes job nodes to be skipped for critical path processing. This is achieved by

  • marking a job node being part of a critical path by prefixing the job node state attribute either with "+" (required) or "-" (skippable).
  • running the Skip order  that depending on its parameterization would run in one of these processing modes:
    • skip the job nodes that are marked as being skippable ("-") (default) or
    • skip the job nodes that are not marked as being required ("+").
  • running the Unskip order that will reverse the above operation.

The different processing modes are supported by the following configuration:

  • Job node states in job chains can be marked to be skipped for critical path processing by prefixing them with a "-" character.
  • Job node states in job chains can be marked to be required for critical path processing by prefixing them with a "+" character.

Usage 

A business process usually consists of one or more individual jobs that make up a job chain. In some cases not all jobs are important to the same extent. Should you face a situation when there is not enough time to process all the jobs of a job chain, e.g. after a maintenance window that reduces nightly processing by some hours, then the critical path defines the sequence of jobs are required to be executed and exlcudes jobs of minor importance to save processing time.

Planned Critical Path Activation 

Scenario 

Quite often business processes do not provide of a fixed start time, average run time and expected end time, but in case of circumstances the fixed start time has to be changed, e.g. due to system maintenance, delayed availability of input data etc.

  • In such an exceptional situation to achieve the business process goals with adherence to the SLA, some jobs can be excluded from the business process (job chains).
  • A job can be marked in a job chain either being skippable ("-") or being critical ("+" ) for the business process.
  • If a situation arises where parts of the job chain have to be skipped, then the JobScheduler operator can start the Skip orderThis order will search through the JobScheduler configuration and set the non-critical jobs to skip processing of orders.
  • A job chain with non-critical jobs is set to skip processing of orders by these jobs independently from the start event of these orders (manually/scheduled).
  • Once the business process completes with only critical jobs, then the job chain's original state can be reactivated by the Unskip order.

Example Job Chain

Job chain critical path
<?xml version="1.0" encoding="iso-8859-1"?>
<job_chain  orders_recoverable="yes" visible="yes" title="JobChainA" max_orders="3">
    <job_chain_node  state="Start"  job="/sos/jitl/JobChainStart" next_state="-100"    error_state="End_Err"/>
    <!-- non critical job step , when critical path is active following job will be skipped -->
    <job_chain_node  state="-100"    job="01_TaskA1"               next_state="200"     error_state="End_Err"/>
    <job_chain_node  state="200"     job="01_TaskA2"               next_state="-300"    error_state="End_Err"/>
    <!-- non critical job step , when critical path is active following job will be skipped -->
    <job_chain_node  state="-300"    job="01_TaskA3"               next_state="400"     error_state="End_Err"/>
    <job_chain_node  state="400"     job="01_TaskA4"               next_state="500"     error_state="End_Err"/>
    <job_chain_node  state="500"     job="01_TaskA5"               next_state="End_Suc" error_state="End_Err"/>
    <job_chain_node  state="End_Suc" job="/sos/jitl/JobChainEnd"   next_state="Success" error_state="Error"/>
    <job_chain_node  state="End_Err" job="/sos/jitl/JobChainEnd"   next_state="Error"   error_state="Error"/>
    <job_chain_node  state="Error"/>
    <job_chain_node  state="Success"/>
</job_chain>

Dynamic Critical Path Activation 

Scenario 

Some business process are dependent on other business process's outcome or an incoming file. A job chain can be configured to monitor a directory and would start as soon as a file matching with the regular expression found in the directory. So for example usually the file arrives every day before 05:00am and the job chain completes successfully at 09:30am, but due to unexpected circumstances if the file arrives later than usual it may be desirable that the job chain should complete at its usual time.

  • In such an exceptional situation the job chain can have the first node check the current time and if it finds late arrival of the file then triggers the Skip order for a specific job chain.
  • Once processing completes successfully the last node of the job chain can start the Unskip which will reset the job chain status back to normal operation with all the jobs to be executed.

Example Job Chain

Job chain critical path Dynamic
<?xml version="1.0" encoding="iso-8859-1"?>
<job_chain  orders_recoverable="yes" visible="yes" title="JobChainA" max_orders="3">
    <job_chain_node  state="Start"                    job="/sos/jitl/JobChainStart" next_state="-100" error_state="End_Err"/>
    <!-- following job will check if its required to activate the critical path --> 
   <job_chain_node  state="activate_critical_path"   job="/sos/operations/activate_critical_path" next_state="-100" error_state="End_Err"/>
    <!-- non critical job step , when critical path is active following job will be skipped -->
    <job_chain_node  state="-100"                     job="01_TaskA1"               next_state="200"     error_state="End_Err"/>
    <job_chain_node  state="200"                      job="01_TaskA2"               next_state="-300"    error_state="End_Err"/>
    <!-- non critical job step , when critical path is active following job will be skipped -->
    <job_chain_node  state="-300"                     job="01_TaskA3"               next_state="400"     error_state="End_Err"/>
    <job_chain_node  state="400"                      job="01_TaskA4"               next_state="500"     error_state="End_Err"/>
    <job_chain_node  state="500"                      job="01_TaskA5"               next_state="End_Suc" error_state="End_Err"/>
    <!-- following job will  deactivate the critical path if activated by the first node--> 
    <job_chain_node  state="deactivate_critical_path" job="/sos/operations/deactivate_critical_path"     next_state="End_Suc" error_state="End_Err"/>
    <job_chain_node  state="End_Suc"                  job="/sos/jitl/JobChainEnd"   next_state="Success" error_state="Error"/>
    <job_chain_node  state="End_Err"                  job="/sos/jitl/JobChainEnd"   next_state="Error"   error_state="Error"/>
    <job_chain_node  state="Error"/>
    <job_chain_node  state="Success"/>
</job_chain>

 




 

 

Write a comment…