Table of Contents |
---|
Scope
- 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.
- 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.
- Events
- A graphical representation of Job Streams is available with JOC Cockpit to monitor job execution and to manage conditions and events.
For a good understanding of Job Streams the user should
know the technical terms like what is Job and Job Chain etc. and know how to work with JobScheduler Master and JOC Cockpit.
- not start with this article if you are new to the JobScheduler. In this case please start with the Product Knowledge Guides.
- have 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 Conditions, Out Conditions, 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 dependencies: The 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 dependencies: The 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.
- Backward dependencies: The JobScheduler comes with a number of solutions to support backward dependencies for jobs and job chains.
Feature Availability
Status subtle true colour Green title FEATURE AVAILABILITY STARTING FROM RELEASE 1.13.0
Objects used by Job Streams
The Job Streams feature introduces a number of objects:
...
Off-Page-Connector
- The Off-Page-Connector is an icon which is used to show the reference whether the defined In Condition or Out Condition is from the same Job Stream or is from another Job Stream. 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 the Out Condition creates an event that is consumed by an expression in an In Condition that is not part of the current job stream.
- Out Condition → if the In Condition consumes an event that is created by an Out Condition that is not part of the current job stream.
Implementation
How to enable Job Streams functionality
How to add or edit Conditions to a job
How to add or remove an Event from a Job Stream
Valid Expressions for Conditions in Job Streams
Import Export Job Streams
Use Cases
Use Case 1: Implement
...
simple Backward
...
Dependencies
- A simple Job Stream to implement a linear Backward Dependency may could look like this:
Explanation
...
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 | ||
3. | job3 | In Condition | job2 | startjob: now |
Out Condition | rc:0 | job3 | ||
4. | job4 | In Condition | job3 | startjob: now |
Out Condition | rc:0 | job4 | ||
Use Case 2: Implement
...
the Split & Join Workflow Pattern
A simple Job Stream to implement the split & join workflow pattern might could look like this:
Explanation
...
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 | ||
3. | job3 | In Condition | job1 | startjob: now |
Out Condition | rc:0 | job3 | ||
4. | job4 | In Condition | job3 | startjob: now |
Out Condition | rc:0 | job4 | ||
5. | job5 | In Condition | job3 | startjob: now |
Out Condition | rc:0 | job5 | ||
6. | job6 | In Condition | job4 and job5 | startjob: now |
Out Condition | rc:0 | job6 | ||
7. | job7 | In Condition | job2 and job6 | startjob: now |
Out Condition | rc:0 | job7 | ||
8. | job8 | In Condition | job7 | startjob: now |
Out Condition | - | - |
Use Case 3: Implement a Job Stream across Folders
A simple An example to implement a job stream across folders and Job Streamswith jobs from different folders.
S. No. | Folder | Job Streams | Job Name | Condition | Expression | Command |
---|---|---|---|---|---|---|
1. | test-conditions-1 | test1 | job1 | In Condition | - | - |
Out Condition | rc:0 | job1 | ||||
2. | test-conditions-2 | test1 | job1 | In Condition | job1 | startjob: now |
Out Condition | rc:0 | |||||
job2 | In Condition | event1 | startjob: now | |||
Out Condition | rc:0 | event2 | ||||
3. | test-conditions-2 | test2 | job3 | In Condition | test1.event2 | startjob : now |
Out Condition | rc:0 | event3 |
Use Case 4: Use Job Streams for Job Monitoring
- The running job can be monitored in two ways:
- The border color of the job becomes green.
- The Task will be listed in the Running Task list and will get be removed automatically once the job execution gets completed.
- The Task Queue tab is used to monitor the tasks which that are queued for the future execution in the future:
- The Task History tab is used to monitor the history of the tasks whether it executed successfully or ended with an errortasks including information about successful or failed executions:
ExplanationExplanations
- The name of the Job Stream is js1.
- The Job Stream includes two jobs, job1 and job2.
- The job1, when executed and completed causes the Out Condition to result to true and to create the Event eve1.
- After that, if the In Condition of job2 results to true then it will set job2 to the pending state as the In Condition of the job2 is configured for the command "startjob" with the parameter "now + 3600".
- Therefore, job2 will wait for it's start time 3600 seconds later.
- During this period, the task will be displayed in the Task Queue list and will be removed automatically once job2 will start.
- In this way, tasks can be monitored to be running, queued, failed or completed successfully.
...
S.No. | Job Name | Condition | Expression | Command |
---|---|---|---|---|
1. | job1 | In Condition | - | - |
Out Condition | rc:0 | eve1 | ||
2. | job2 | In Condition | eve1 | startjob: now + 3600 |
Out Condition | rc:0 | eve2 |
Roadmap
The Job Streams feature is subject to future improvement:
We will add editing capabilities for jobs and job-related objects in order to replace the JOE Job Editor.
- The XML Editor will be migrated to JOC Cockpit.
References
- Links to Change Management System
Jira server SOS JIRA columns key,summary,type,created,updated,due,assignee,reporter,priority,status,resolution serverId 6dc67751-9d67-34cd-985b-194a8cdc9602 key JOC-712
Further Resources
Display children header |
---|