Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Job Streams are a means to implement dependencies with jobs. This feature improves existing forward dependencies (job chains) by introducing backward dependencies (conditions).
  • Job Streams bring a number of new objects to the user interface: 
    • Events
      • 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.
      • Global Events are the events that are created for the execution of jobs among any Master Cluster configuration. These are the tokens that are created on-the-fly to signal execution of jobs on another JobScheduler Master.
    • In Conditions
      • 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 Conditions
      • 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.
  • A graphical representation of Job Streams is available with JOC Cockpit to monitor job execution and to manage conditions and events.
    • Using the Job Streams view in JOC Cockpit offers three types of display
      • The left symbol (highlighted) displays the graphical view that is used for the following explanations.
      • The middle symbol displays the card view.
      • the right symbol displays the textual view similar to what you see from the Jobs view.

...

  • 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. The status of a job is visible with the Job Stream. Each job status is represented with a different border color.
      • Pending - Yellow 
      • Running - Green
      • Stopped - Red

Image Modified


  • Events

    • Events are tokens that are created on-the-fly to signal execution results of jobs. 
    • Events are represented by a hexagon. An event has the following states:
      • Exist - If the event exists then the background color changes to grey and the border style depends on two factors:
        • Solid border → if the event is created by a job in the current Job Stream
        • Dotted Border → if the event is created by a job in another Job Stream than the current.
      • Not Exist - If the event does not exist then the background color is white.

        Image Modified

  • Out Conditions

    • 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 and/or deletes the events. 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 a 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.

Image RemovedImage Added


  • In Conditions

    • 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 a 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.



    • In Conditions can be consumed or not consumed:
      • An In Condition is defined as being consumed when the job has once started by the result of In Condition. The consumed In Condition is represented by a white background color.
      • An In Condition is defined as being not consumed if it has not yet been used to start a job. The not consumed In Condition is represented by a grey background color.

Image RemovedImage Added


  • Off-Page-Connector

    • The Off-Page-Connector is an icon which is used to show whether there is a reference to another Job Stream then the current. The icon is represented by a pentagon at the top right corner of the In Condition or Out Condition.
    • The Off-Page-Connector is displayed for an
      • In Condition → if aan Out Condition that is not part of the current job stream creates an event that is consumed by an expression in the In Condition.
      • Out Condition → if aan In Condition that is not part of the current job stream consumes an event that is created by the Out Condition

Image RemovedImage Added


Implementation 

...

  • A Job Stream to implement a linear Backward Dependency could look like this:

Image AddedImage Removed

Explanation

  • The name of the Job Stream is job_stream1.
  • The Use-Case job_stream1 is used to show a linear backward dependency.
  • Here when the job1 runs it creates an event job1. The job2 gets executed automatically as it has an In Condition which checks whether the event job1 is created or not.
  • Similarly the jobs job3 and job4 are started when the event job2 and job3 are created.

...

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

Image RemovedImage Added


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.

...

  • The running job can be monitored in two ways:
    1. The border color of the job becomes green.
    2. The Task will be listed in the Running Task list and will be removed automatically once the job completed.


Image Modified

  • The Task Queue tab is used to monitor the tasks that are queued for future execution:

Image RemovedImage Added


  • The Task History tab is used to monitor the history of tasks including information about successful or failed executions:


Image Modified


Explanations

...