HCL Workload Automation, Version 9.4

Scenario: Creating a job definition for a script to run on a specific operating system

In this scenario, a job is created to run a script on a Red Hat Enterprise Linux system.

About this task

By specifying candidate operating systems, you can define the type of operating system on which a job is to run, in this case Linux. To direct the job to a specific flavor of Linux, you must define a related resource and link it to the job resources by creating a relationship. To create a job definition that does this, perform the following steps:


  1. In the Job Brokering Definition Console select File > New > Job brokering definition and create a new job definition named rhjob. The job definition opens at the Overview page with the job name assigned.
  2. Open the Application page and define the required information for the application that the job is to run.
  3. Open the Resources page and specify the operating system type requirement, as follows:
    1. Select the Software Requirements tab.
    2. In the Candidate Operating Systems pane, click Add. The Operating System Details dialog box is displayed.
    3. In the Type menu, select LINUX and click OK.
  4. Open the Related Resources page and create a resource requirement for the Red Hat flavor of Linux, as follows:
    1. In the Resource Requirements pane, click Add. The Resource Requirement Details dialog box is displayed.
    2. In the ID field, specify a meaningful ID, in this example, redhat.
    3. In the Type menu, select Operating System.
    4. In the Resource Properties pane, click Add Requirement. The Resource Property details dialog box is displayed.
    5. In the Property Name menu, select Display Name.
    6. In the Property Value , type Red*.
  5. Switch back to the Resources page to link the resource requirement to the operating system resource.
    1. Select the Advanced Requirements tab.
    2. In the Relationships pane, click Add. The Relationship Details dialog box is displayed.
    3. In the Type menu, select Contains.
    4. In the Target menu, select the Red Hat resource requirement that you created and click OK.
  6. Select File > Save to save the job definition file.


The JSDL file created for this scenario has the following syntax:
<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
JSDL.xsd" description="Job to run on Red Hat Linux" name="rhjob">
  <jsdl:application name="executable">
    <jsdle:executable path="/opt/myExecutable">
  <jsdl:resources>  <jsdl:resources>
      <jsdl:operatingSystem type="LINUX"/>
    <jsdl:relationship target="redhat" type="Contains"/>
  <jsdl:relatedResources id="redhat" type="OperatingSystem">
      <jsdl:requirement propertyName="DisplayName">