Use the Get Active States method to receive an XML file that contains the possible work order states for a specified workflow.
HTTP method: GET
URI: /workorder/connection_name/states/workflow_id
Request payload content type: None
Response payload content type: application/xml
Expected response: HTTP/1.1 200 OK
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 |
| workflow_id | Enter the ID that identifies the workflow whose active states you want to receive. Enter 1 for the default workflow that is used by the manager and the service interface. | Y |
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<ns2:states xmlns:ns2="http://www.ibm.com/optim/xsd/workorder/9.1.0">
<ns2:state>
<stateId>100</stateId>
<wfId>1</wfId>
<stateName>NEW</stateName>
</ns2:state>
<ns2:state>
<stateId>200</stateId>
<wfId>1</wfId>
<stateName>REQUESTED</stateName>
</ns2:state>
<ns2:state>
<stateId>250</stateId>
<wfId>1</wfId>
<stateName>DENIED</stateName>
</ns2:state>
<ns2:state>
<stateId>300</stateId>
<wfId>1</wfId>
<stateName>SUBMITTED</stateName>
</ns2:state>
<ns2:state>
<stateId>301</stateId>
<wfId>1</wfId>
<stateName>INCOMPLETE</stateName>
</ns2:state>
<ns2:state>
<stateId>350</stateId>
<wfId>1</wfId>
<stateName>REJECTED</stateName>
</ns2:state>
<ns2:state>
<stateId>400</stateId>
<wfId>1</wfId>
<stateName>READY</stateName>
</ns2:state>
<ns2:state>
<stateId>450</stateId>
<wfId>1</wfId>
<stateName>RETURNED</stateName>
</ns2:state>
<ns2:state>
<stateId>999</stateId>
<wfId>1</wfId>
<stateName>TERMINATED</stateName>
</ns2:state>
</ns2:states>
The following response codes can be received when the method is complete.
| Response code | Description |
|---|---|
| 200 | OK. The active state list was successfully returned. |
| 400 | Bad Request. A malformed request was submitted. |
| 404 | Not Found. The workflow ID is valid but no active states exist for the workflow ID. This is a configuration issue. |