Table of Contents |
---|
Introduction
The feature of Job Stream Streams is a means to implement dependencies with jobs. This feature improves existing forward dependencies (job chains) by introducing backward dependencies (conditions).
The current article is intended to function work as a guide to the Job Streams functionality which provides an example of how the different features of Job Streams can be used.
For more information on Job Streams see:
Video
Check our training video:
Widget Connector | ||||||
---|---|---|---|---|---|---|
|
Example
Download
- Download the attached archive:
- Windows operating system example jobstream_split_join_example.zip
- Linux operating system example example jobstream_split_join_example.tar.gz
- Unzip the archive to the
live
folder of your JobScheduler installation.- Note: Don't rename the configuration folder. Leave folder name for the job configuration to jobstream only.
- Download the attached Job Stream JSON file jobstream.json.
- Download the attached JobStream JSON file jobstream-jobstream-1.13.5.json for the example in release 1.13.5.
- The jobstreams.json includes the JSON data for the below configuration of Conditions with the job:
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 | ||
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 | startjob: now |
Out Condition | rc:0 | job7 | ||
8. | job8 | In Condition | job6 and job7 | startjob: now |
Out Condition | - | - |
...
- Login to the JOC Cockpit, switch to the Job Streams tab.
- Note: Make sure that you enable the Job Streams plugin while or after the installation of JobScheduler. Refer to the knowledge base artilce article How to enable Job Streams Functionality for reference.
- Click on Import Job Stream.
- Note: Before you import the Job Stream unzip the attached job configuration to the live folder.
- This opens a browser-based file import procedure which allows file selection. Import the attached JSON file. An Import Job Stream modal window opens as shown in the screenshot below:
- Select all the jobs from the Import Job Stream modal window and click import. Refer to the article on How to import and Job Streams for details.
- Select the folder jobstream from the left tree structure. The graph for the Job Stream jobstream1 opens as shown in the screenshot below:
- Click on Expand Details button to display the In Condition and Out Condition for the job.
- Note: Click on the Collapse Details button to collapse the In Conditions and the Out Conditions for the job.
- The expanded Job Stream diagram opens as shown in the screenshot below:
- To start the execution of Job Stream click on the action menu of job1 and select Start Task Now.
- The state of the job1 changes from Pending to Running. To monitor the status of job stream refer to the Use Case 4 of the article Job Streams for reference.
Note: Once the Job Stream is run the In Conditions will be consumed and the events will be created by Out Conditions. So to re-run the Job Stream you need to first Reset the Job Stream using the Reset button and again use action menu of job chain and select Start Task Now.