Use the Create Work Order method to create a work order. A work order number that identifies the work order is automatically assigned to the work order.
HTTP method: POST
URI: /workorder/connection_name/transition_id
Request payload content type: application/xml
Response payload content type: None (a link to the newly created work order is returned in the Location field of the response header; for example, http://interface:8080/server/workorder/10047)
Expected response: HTTP/1.1 201 Created
The method URI contains the following parameters.
| Name | Description | Required |
|---|---|---|
| connection_name | Enter the name that identifies the Optim™ directory connection that is to contain the work order. | Y |
| transition_id | Enter the ID that identifies the state transition of the
work order to be created. A state transition is a valid
change of state for a work order. The manager and the service interface
allow only state transitions that are defined in the workflow. To
get the valid state transitions for your workflow:
|
Y |
<?xml version="1.0" encoding="UTF-8"?>
<workorder:workorder 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 ">
<wfId>1</wfId>
<stateId>100</stateId>
<description>Create a subset of customers with personally identifiable information masked</description>
<priority>Within 8 Hours</priority>
<comments>Mask names, addresses, phone numbers, email addresses</comments>
<createdBy>TEST1</createdBy>
</workorder:workorder>
The following response codes can be received when the method is complete.
| Response code | Description |
|---|---|
| 201 | Created. The work order was successfully created. |
| 400 | Bad Request. A malformed request was submitted. |