Run Work Order method
For Optim™ V11.3.0.8 or higher, 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
Example: http://localhost:8080/server/workorder/DB2_TEST/execute/10012
Request payload content type: application/xml
Response payload content type: application/xml
Expected response: HTTP/1.1 200 OK
Parameters
The method URI contains the following parameter(s):
| Name | Description | Required |
|---|---|---|
| connection_name | Enter the name that identifies the Optim directory connection that contains the work orders. Refer to Get Optim Directory Connections method to get a list of your connections, and then use the name from the payload. | Y |
| work_order_id | Enter the ID that identifies the work order that you want to receive. Refer to Get All Work Orders method or Create Work Order method to get this ID. | Y |
Request payload example
- (Without overrides) Applies to workorders associated with both service or service
set:Note: The proxyURL or the Optim server URL can be retrieved from the API
http://localhost:8080/server/runtime.<?xml version="1.0" encoding="UTF-8"?> <ns2:workOrderExecution xmlns:ns2="http://www.ibm.com/optim/xsd/workorder/9.1.0"> <workOrderId>10012</workOrderId> <proxyURL>http://192.168.56.1:12000/</proxyURL> <executedBy>admin</executedBy> </ns2:workOrderExecution> - (With overrides) Supported only for individual services:Note: The proxyURL or the Optim server URL can be retrieved from the API
http://localhost:8080/server/runtime.OverrideFilePath: For information on the keywords for the override parameters, see https://www.ibm.com/support/knowledgecenter/en/SSMLQ4_11.3.0/com.ibm.nex.optimd.tdm.doc/Acmdline/opmoveuse-c-override_keywords.html.<?xml version="1.0" encoding="UTF-8"?> <ns2:workOrderExecution xmlns:ns2="http://www.ibm.com/optim/xsd/workorder/9.1.0"> <workOrderId>10012</workOrderId> <proxyURL>http://192.168.56.1:12000/</proxyURL> <overrideFilePath>C:\IBM\InfoSphere\Optim\temp\extract_overrides.txt</overrideFilePath> <executedBy>admin</executedBy> </ns2:workOrderExecution>
Response payload example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:executionResults xmlns:ns2="http://www.ibm.com/optim/xsd/workorder/9.1.0">
<executionId>3b734363-e363-4ee6-822a-5761023fe500</executionId>
<serviceId>b7401577-397f-420e-85d2-de9405f9470e</serviceId>
<linkType href="http://localhost:8080/server/workorder/DB2_TEST/monitor/3b734363-e363-4ee6-822a-5761023fe500"/>
</ns2:executionResults>
Response codes
The following response codes can be received when the method is complete:
| Response code | Description |
|---|---|
| 200 | OK. |
| 400 | Bad Request. A malformed request was submitted. |
| 404 | Not found. |