In this scenario, the target for the job is determined
by several requirements defined as logical resources. A resource group
has been created to include all the logical resources required for
the job.
About this task
To create a job definition that does this, perform the following
steps:
Procedure
- In the Job Brokering Definition Console select and create a new job
definition named loggroupjob. The
job definition opens at the Overview page with the job name assigned.
- Open the Application page and define the required information
for the application that the job is to run.
- Open the Related Resources page and create a requirement
for a logical resource, as follows:
- In the Resource Requirements pane, click Add. The Resource Requirement Details dialog box is displayed.
- In the ID field, specify a meaningful
ID, in this example, loggroup.
- Open the Resources page and create a relationship to the
resource requirement, as follows:
- Select the Advanced Requirements tab.
- In the Relationships pane, click Add. The Relationship Details dialog box is displayed.
- In the Type menu, select Associates
with.
- In the Target menu, select the
resource requirement that you created and click OK.
- Switch back to the Related Resources page and add the logical
resource group as follows:
- In the Resource Group pane, click Add. The Resource Group Details dialog box is displayed.
- In the Group Name field, type the resource group name,
as defined in the Dynamic Workload Console.
- Select to save the job definition file.
Results
The JSDL file created for this scenario has the following
syntax:
<jsdl:jobDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jsdl="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl"
xsi:schemaLocation="http://www.abc.com/xmlns/prod/scheduling/1.0/jsdl JSDL.xsd"
description="A job whose requirements are defined by a number of logical
resources. " name="loggroupjob">
<jsdl:application name="executable">
<jsdle:executable path="/opt/myExecutable">
</jsdle:executable>
</jsdl:application>
<jsdl:resources>
<jsdl:relationship target="loggroup" type="AssociatesWith"/>
</jsdl:resources>
<jsdl:relatedResources id="loggroup" type="LogicalResource">
<jsdl:group name="logresgroup"/>
</jsdl:relatedResources>
</jsdl:jobDefinition>