Creating job stream definitions

You can create a job stream, add a run cycle, add jobs, and define an event rule.

About this task

The purpose of the following scenario is to show how to create a job stream, add a run cycle, add jobs, and define an event rule in the context of an example.

The scope of the scenario is to create a job stream named “PAYROLL_PROC_21” that monthly creates and uploads payrolls for the year 2021 into the payroll management system. When the job stream is complete, an email that contains the following text is sent to the HR team: “The payrolls have been successfully created and uploaded into the payroll management system.”.

Procedure

  1. Create a job stream and define general information about it:
    1. From the Design menu, click Workload Designer page, and then select the engine.
    2. In Explore area, click Create new + and select Job stream.
    3. In General Info, in Folder, select 2021.
      Note: If the 2021 folder does not exist, you can create it by clicking Create new and choosing Folder.
    4. In General Info, in Name, type PAYROLL_PROC_21.
    5. In General Info, in Workstation, select MDM_production.
  2. Add a run cycle to the job stream:
    1. In the job stream expandable row, click + Add run cycle.
    2. In General Info, in Name, type RC1.
    3. In General Info, in Starting, select 30th April.
    4. In Rule, in Repeat schedule, select Monthly by month day.
    5. In Rule, in On the (descending order), select Last Day.
  3. Add the existing jobs to the job stream:
    1. In the job stream expandable row, click + Add job.
    2. Browse the following jobs and add them to the job stream:
      • OPERATOR_INTERVENTION
      • DB_BACKUP
      • ABSENCES
      • RESTART_DB
      • RESTART_WAS
      • TEMP_CLEANUP
      • ABSENCES_2
  4. Save the job stream.
  5. Define a new event rule:
    1. Click Create new + from the Workspace area, and choose Event rule.
    2. In General Info, in Folder, select 2021.
    3. In General Info, in Name, type PAYROLL_UPLOAD.
    4. In General Info, for Save as draft select Off.
  6. Define the trigger event:
    1. In the event rule expandable row, click Add events.
    2. Click the Job Stream Completed event from the HCL Workload Automation plan events category.
    3. In Event name, type jsCompletedEvt1.
    4. In Job stream workstation, select matches and type MDM_production.
    5. In Job stream name, select matches and type PAYROLL_PROC_21.
  7. Define the action to be performed when the defined event occurs:
    1. In the event rule expandable row, click Add actions.
    2. Click the Send mail action from the Mail sender plug-in category.
    3. In To (recipient), type HR_department@email.com.
    4. In Subject, type Payroll uploaded successfully.
    5. In Body, type The payrolls have been successfully created and uploaded into the payroll management system.
  8. Save the event rule.

Results

You created a job stream that monthly creates and uploads payrolls for the year 2021 into the payroll management system. Furthermore, when the job stream is complete, an email with the following content is sent to the HR department: “The payrolls have been successfully created and uploaded into the payroll management system.”.