Scope

Events for In Conditions are created or deleted from Job Streams depending on the result of a previous Out Condition. Alternatively, Events can be manually created or deleted by use of the JOC Cockpit user interface. Follow the steps to create or delete an Event.

Steps to add or remove an Event

  • Login to JOC Cockpit and switch to the Job Streams tab.
  • Select the graphical view of the Job Stream. 
  • Events are represented by a hexagon. If any Out Condition is added to a job to create an Event then it will be displayed in the Job Streams diagram.
  • The Events in the Job Stream provide an action menu item to Add Event or Delete Event.


  • The hexagon action menu offers the option Add Event if the Event does not exist.

  • The action menu offers the option Delete Event if the Event already exists.

Use-Cases

The Add Event and Delete Event operations have their own use cases. The Add Event and Delete Event operations can be used to explicitly trigger the start of the Job Stream or to stop the execution of a Job Stream. 

Use Case 1: Add an Event

  • To execute the further jobs in the Job Stream with the In Condition as the event created by the previously failed job then event of the failed job can be added manually to make the expression result true for the In Condition of further jobs in Job Stream. 
  • If a job in a Job Stream fails and will therefore not create an event in its Out Condition then the Job Stream will be disrupted as subsequent jobs might wait for this event in their In Conditions. In this situation a user might want to manually add an event in order to force the Job Stream to continue. The manually added event will automatically be evaluated and if the expressions in In Conditions now evaluate to true then the respective jobs will start.
  • For example:
    • There are two jobs in a Job Stream, job1, and job2 with the following conditions:

S. No.

Job Name

Condition

Expression

Command






1.

job1

In Condition

-

-



Out Condition

rc:0

job1






2.

job2

In Condition

job1

startjob: now



Out Condition

rc:0

job2

  • For any reason, if job1 is failed then the event job1 will not be created and further execution of the  Job Stream will stop.
  • Therefore, to continue further execution of the Job Stream the event can be added manually without repeatedly executing job1. 
  • The newly added event will be automatically evaluated by a JOC Cockpit background process, typically every few minutes. To speed up this cycle you can use the Check Conditions button in the Job Streams view that will force immediate evaluation of all conditions in all Job Streams.

Use Case 2: Delete an Event

  • To stop execution of a Job Stream you can force the result of an expression in the In Conditions to become false. To this purpose delete the events from the Job Stream that are expected by the In Conditions.
  • For example
    • There are two jobs in a Job Stream, job1, and job2 with the following conditions:

S. No.

Job Name

Condition

Expression

Command

Mark Expression






1.

job1

In Condition

-

-




Out Condition

rc:0

job1








2.

job2

In Condition

job1

startjob: now

unchecked


Out Condition

rc:0

job2



  • The event job1 is created after successful execution of job1.
  • The Mark Expression for job2 is unchecked which means that the job will continue to be running until the result of the expression in the In Condition is false.
  • Therefore, to stop further execution of the Job Stream the event can be removed manually using the Delete Event option from the events' action menu. 


Settings



To see the events in all the jobs streams, enable the Show Job Stream Events:

  1. go to profile
  2. click on the checkbox 


  • No labels