Use the Run Work Order method to run the service that is associated with a work order. The service can be run without any changes. Alternatively, you can run the service with input values that are different from the values that are saved with the service.
HTTP method: POST
URI: /workorder/connection_name/execute/work_order_id
Request payload content type: application/xml
Response payload content type: None (a link to the newly created service instance is returned in the Location field of the response header; for example, http://interface:8080/server/monitor/fbf1cdd5-bdf7-4682-96ad-722672af0001)
Expected response: HTTP/1.1 202 Accepted
The method URI contains the following parameters.
| Name | Description | Required |
|---|---|---|
| connection_name | Enter the name that identifies the Optim™ directory connection that contains the work order. | Y |
| work_order_id | Enter the ID that identifies the work order whose service you want to run. | Y |
<?xml version="1.0" encoding="UTF-8"?>
<workorder:workOrderExecution xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:workorder="http://www.ibm.com/optim/xsd/workorder/9.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/optim/xsd/workorder/9.1.0 resource.xsd ">
<workOrderId>10047</workOrderId>
<proxyURL>http://servercomputer:12000/</proxyURL>
<executedBy>TEST1</executedBy>
</workorder:workOrderExecution>
The following example shows a request to run the service
that is associated with work order 10047, and to use the input values
in an override file at C:\override\override.txt on
the server computer.<?xml version="1.0" encoding="UTF-8"?>
<workorder:workOrderExecution xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:workorder="http://www.ibm.com/optim/xsd/workorder/9.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/optim/xsd/workorder/9.1.0 resource.xsd ">
<workOrderId>10047</workOrderId>
<proxyURL>http://servercomputer:12000/</proxyURL>
<overrideFilePath>C:\override\override.txt</overrideFilePath>
<executedBy>TEST1</executedBy>
</workorder:workOrderExecution>
The following example shows a request to run the service
that is associated with work order 10047 with 2 changed input values
(override values).<?xml version="1.0" encoding="UTF-8"?>
<workorder:workOrderExecution xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:workorder="http://www.ibm.com/optim/xsd/workorder/9.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ibm.com/optim/xsd/workorder/9.1.0 resource.xsd ">
<workOrderId>10047</workOrderId>
<proxyURL>http://servercomputer:12000/</proxyURL>
<executedBy>TEST1</executedBy>
<overrides>
<workorder:override>
<id>override-id-000001</id>
<value>Value One</value>
</workorder:override>
<workorder:override>
<id>override-id-000002</id>
<value>Value Two</value>
</workorder:override>
</overrides>
</workorder:workOrderExecution>
The following response codes can be received when the method is complete.
| Response code | Description |
|---|---|
| 202 | Accepted. The service that is associated with the work order was processed and accepted. This response code does not mean that the service request completed successfully. |
| 400 | Bad Request. A malformed request was submitted. |