Cisco Cisco Workload Automation 6.3 Developer's Guide

Page of 190
38
JobRun
JobRun Examples
Override  a JobDependency instance
Release
Remove
Rerun
JobRun Examples
From the browser, issue  and then click Manual Commands (Post) to take you to the API post screen of the Client 
Manager. You can test the REST API examples from that screen. For valid parameters and successful execution of a 
request, you will get a response/result. For invalid parameters and unsuccessful execution of a request, you will get error 
messages and/or exceptions. 
JobRun Example 1 – Override a JobRun Instance
The JobRun object provides a method called override. The parameter called id (e.g. 120) specifies the JobRun instance 
to be overridden. The following REST API call will override JobRun 120.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
  <id>xxx</id>
  <tes:JobRun.override xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
  <tes:id>120</tes:id>
  </tes:JobRun.override>
</entry>
JobRun Example 2 – Override a JobDependency Instance of a JobRun
The JobRun object provides a method called overrideDependency. The method has two parameters. The first 
parameter called id (e.g. 124) specifies the JobRun instance. The second parameter called jobrundepid (e.g. 
40)specifies the JobDep (Job dependency) instance. The following REST API call will override JobDependency 40 of 
JobRun 124.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
  <id>1</id>
  <tes:JobRun.overrideDependency    xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
    <tes:id>124</tes:id>
    <tes:jobrundepid>40</tes:jobrundepid>
  </tes:JobRun.overrideDependency>
</entry>
JobRun Example 3 – Cancel a JobRun
The JobRun object provides a method called cancel.
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://purl.org/atom/ns#">
  <id>1</id>
  <tes:JobRun.cancel xmlns:tes="http://www.tidalsoftware.com/client/tesservlet">
    <tes:id>xxx</tes:id>
  </tes:JobRun.cancel>
</entry>
JobRun Example 4 – Set the Status of a JobRun
The JobRun object provides a method called assignStatus.