Create Work Order method

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

Parameters

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:
  1. Use the Get Active States method to get a list of all active states for the current workflow, find the state with a name of NEW, and obtain the state ID for that state.
  2. Use the Get Active Reachable Transitions method to get a list of state transitions for the NEW state. There is only one state transition possible for the NEW state. Use this state transition when you create the work order.
Y

Request payload example

The following example shows a request by user TEST1 to create a subset of customer information and to mask the personally identifiable information within the subset.
<?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>

Response codes

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.


Feedback