Introduction

The JOC Cockpit Job Streams view provides import and export functions to allow reliable Job Stream deployment, for example, from a source, such as an Integration System (INT, UAT) to a target, such as a Production System (PROD).

The Job Streams deployment involves the following steps:

  1. Export the Job Stream from the INT environment JOC Cockpit. The .json file for the Job Stream will be saved to the file system.
  2. Transfer the .json Job Stream file to the PROD environment.
  3. Import the .json Job Stream file to the PROD JOC Cockpit.

Note that Job Streams are always exported with Conditions and folder information. It includes the In Conditions and Out Conditions for the job, and it includes the Path of the Job Stream.

  • If a folder is found on the target system with the same Path of Job Stream and also includes the jobs created with the Conditions in the Job Stream then the Job Stream is created. 

"New" Job Stream Import

The following configuration is used for demonstration:

  1. On the INT System two Job Streams have been configured in the folder named test:
    • One Job Stream is named jobstream1 having two jobs [job1 and job2] with the below 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


  • Second Job Stream named jobstream2 having two jobs [job3 and job4] with below conditions.

S. No.

Job Name

Condition

Expression

Command






1.

job3

In Condition

-

-



Out Condition

rc:0

job3






2.

job4

In Condition

job3

startjob: now



Out Condition

rc:0

job4


  • On the PROD System, a folder named test with the required jobs [job1, job2, job3, and job4] is created.

Export Procedure

The export can be done from the Job Streams tab of the JOC Cockpit.

  • Job Streams can be exported on a folder basis. If a folder includes a number of Job Streams then using the Export Job Stream function all Job Streams will be exported.

  • On clicking the Export button both Job Streams will be saved to a single .json file in the INT file system. This file can now be transferred to the PROD environment.

The content of the .json file including the exported Job Streams is attached below:

Listing of the exported .json file
[
  {
    "jobStream": "jobstream2",
    "jobs": [
      {
        "job": "/TestCondition2/job1",
        "inconditions": [],
        "outconditions": [
          {
            "conditionExpression": {
              "expression": "rc:0"
            },
            "outconditionEvents": [
              {
                "command": "create",
                "event": "job1",
                "globalEvent": false
              }
            ],
            "jobStream": "jobstream2"
          }
        ]
      },
      {
        "job": "/TestCondition2/job2",
        "inconditions": [
          {
            "conditionExpression": {
              "expression": "job1 "
            },
            "inconditionCommands": [
              {
                "command": "startjob",
                "commandParam": "now"
              }
            ],
            "jobStream": "jobstream2"
          }
        ],
        "outconditions": [
          {
            "conditionExpression": {
              "expression": "rc:0"
            },
            "outconditionEvents": [
              {
                "command": "create",
                "event": "job2",
                "globalEvent": false
              }
            ],
            "jobStream": "jobstream2"
          }
        ]
      }
    ]
  },
  {
    "jobStream": "jobstream3",
    "jobs": [
      {
        "job": "/TestCondition2/job3",
        "inconditions": [],
        "outconditions": [
          {
            "conditionExpression": {
              "expression": "rc:0"
            },
            "outconditionEvents": [
              {
                "command": "create",
                "event": "job3",
                "globalEvent": false
              }
            ],
            "jobStream": "jobstream3"
          }
        ]
      }
    ]
  }
]

Import Procedure

  • The import procedure is started in the Job Streams tab of JOC Cockpit in the target environment by clicking the Import Job Stream button. 

  • This will open a standard browser-based file import procedure allowing file selection either by drag-and-drop or by browsing for files.

  • Once the file has been selected an Import Job Stream modal window will open as shown in the next screenshot:

As can be seen from the screenshot, selection of individual Job Streams is offered during import.

After completion of the import, the Job Stream will be added to the path where it was created in the INT environment.

  • No labels