You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 68 Next »

Scope

  • JobScheduler supports event handling using In Conditions and Out Conditions for jobs, see  JOC-712 - Getting issue details... STATUS
  • Introducing job streams provides better support for backward dependencies with the JobScheduler. 
  • The job streams bring a number of new objects to the user interface: 
    • Event
      • Events are tokens that are created on-the-fly to signal execution of jobs. Such Events can be used later on by successor jobs to check conditions that result in the current job being executed or not.
    • In Condition
      • A job can have a number of In Conditions that control if the job will be executed. Therefore an In Condition includes a number of Expressions that are evaluated to become true or false. The result true will cause a job start, the result false will not cause a job to start. Therefore a false result of an In Condition will put on hold the Job Stream, i.e. further execution of subsequent jobs.
      • Expressions in In Condition typically check the existence of Events. A number of Events can be evaluated including logical operators such as And, Or.
    • Out Condition
      • A job can have a number of Out Conditions that are checked after job execution.Out Condition include a number of Expressions and depending on the result of the check an Out Condition adds or deletes an Event that can be checked by In Conditions of later jobs.
      • Expressions in an Out Condition typically check the result of job execution, for example, checks the return code of job execution.
    • Graphical representation:
      • The graphical representation of job streams is available with JOC Cockpit to manage conditions and expressions..
  • The user should:

    • Know the technical terms like what is Job, Event and Job Chain, etc. and working of the JobScheduler and JOC Cockpit. 

    • Not start with this article if he/she is new to the JobScheduler. 
    • Have the basic knowledge on how to create the jobs.

Motivation

  • What is this feature good for? 
    • The end users can implement backward dependency for jobs using In-Condition, Out-Condition, write the expressions and can add or remove events. 
    • This feature allows graphical configuration of job dependencies. 
  • What problem does it solve? 
  • This feature was developed to add better backward dependencies to JobScheduler. 
    • Backward dependenciesThe JobScheduler comes with a number of solutions to support backward dependencies for jobs and job chains. 
      • Check the job and job chain history for previously executed jobs and orders. 
      • Synchronize job chains. 
      • Job Streams. 
    • Forward dependenciesThe JobScheduler comes with built-in features for implementing forward dependencies for jobs and orders. 
      • Basic dependencies are implemented by the Objects for the Jobs, Job Chains and Orders. 
      • Successor jobs can be made to depend on the code returned by the current job. 
      • Create successor orders for job chains depending on the return code of the current job chain node. 

Feature Availability

FEATURE AVAILABILITY STARTING FROM RELEASE 1.13.0

Feature

The Job Streams include various feature:

  • Jobs
    • Jobs are the basic unit for the processing of executable files (programs, scripts, commands, etc.).
    • Jobs are represented with a rectangular shape and grey background color. There is the status of a job in Job Stream. Each job status is represented with a different border color.
      • Pending - Yellow 
      • Running - Green
      • Stopped - Red


  • Events

    • Events are tokens that are created on-the-fly to signal execution results of jobs. 
    • Events are represented by a hexagon with grey background color. The border color changes to green if the Event exists and to grey if the Event does not exist.
  • Out Condition

    • Out Conditions include a number of Expressions that are evaluated after job execution and that result in true or false. If an Expression results in true then according to the Event List (Create Event or Delete Event) it creates or deletes the event. If the Expression result is false then it puts on hold further execution of the job stream if these Events are used by In Conditions of successor jobs. 
    • Out Conditions are represented by right inclined parallelograms with grey background color. The border color changes to green if the Expression results to true. The text color of the Expression also changes to green and black if the respective part of the Expression result is true or false.


  • In Condition

    • In Conditions include a number of Expressions that can result in executing a Command to either start a job or to write a log file entry. If the Expression result is true then it executes the Command, and if the result is false then it does not execute the Command.
    • In Conditions are represented by left inclined parallelograms with grey background color. The border color changes to green if the Expression results to true. The text color of the Expression changes to green and black if the Expression result is true or false respectively.

Implementation 

Use Cases

Use Case 1: Implement a simple Backward Dependency

  • job1 → job2 → job3 → job4


Use Case 2: Implement a Split & Join Workflow Pattern

A simple Job Stream to implement the split & join workflow pattern might look like this:


Explanation

  • The name of the Job Stream is test.
  • The Job Stream includes two split operations, at first job1 is split into job2 and job3, and then job3 is split into job4 and job5.
  • The job1, when executed if the Out Condition results to true then the Event job1 is created.


No.

Job Name

Condition

Expression

Command






1.

job1

In Condition

-

-



Out Condition

returncode:0

job1






2.

job2

In Condition

job1

startjob: now



Out Condition

returncode:0

job2






3.

job3

In Condition

job1

startjob: now



Out Condition

returncode:0

job3






4.

job4

In Condition

job3

startjob: now



Out Condition

returncode:0

job4






5.

job5

In Condition

job3

startjob: now



Out Condition

returncode:0

job5






6.

job6

In Condition

job4 and job5

startjob: now



Out Condition

returncode:0

job6






7.

job7

In Condition

job2 and job6

startjob: now



Out Condition

returncode:0

job7






8.

job8

In Condition

job7

startjob: now



Out Condition

-

-


Use Case 3: Implement a Job Stream across Folders

A simple example to implement a job stream across folders and Job Streams.

S. No.FolderJob StreamsJob NameConditionExpressionCommand







1.test-conditions-1test1job1In Condition--




Out Conditionreturncode:0job1







2.test-conditions-2test1job1In Conditionjob1startjob: now




Out Conditionreturncode:0event1










job2In Conditionevent1startjob: now




Out Conditionreturncode:0event2







3.test-conditions-2test2job3In Conditiontest1.event2startjob : now




Out Conditionreturncode:0event3
  • Step-1


  • Step-2


  • Step-3




Use Case 4: Use Job Streams for Job Monitoring

Use Case 5: Use Job Streams to analyze Job Execution Problems


Roadmap

  • This feature is subject to future improvement:

    • Done: User can add and remove Events from the graphical representation. 

    • Add editing capabilities for jobs in order to replace JOE 

  • There will be a new tab named as "Job Streams" in the JOC Cockpit which will replace the JOE in the future. 

  • This "Job Streams" contains the working and explanation of the Jobs and Job Chains. 

  • User can create a Job by just drag and drop.  

  • Provide export functionality to display (print) job streams in PDF, PNG 


References





  • No labels