This article provides SOAP XML examples for managing approver workflows through the Task Execution Web Service (TEWS). It covers how to retrieve a worklist for a specific user and how to subsequently approve or reject specific workitems.
When retrieving a worklist, the Title value in the TEWS response identifies which user the workitem belongs to (e.g., "Modify User task, User user1").
Identity Manager 14.x & v15
Use the following SOAP call to retrieve a worklist for a specific user. The response will contain the Workitem ID (found in the value field) and the Title (used to identify the subject user).
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://wsdl.ca.com/">
<soapenv:Header/>
<soapenv:Body>
<wsdl:ApproveModifyUser>
<wsdl:admin_id>MY_LOGIN_USER</wsdl:admin_id>
<wsdl:admin_password>MY_PASSWORD</wsdl:admin_password>
<wsdl:workItemId>X Y ZZZ:WPDS</wsdl:workItemId>
<wsdl:action>approve</wsdl:action>
</wsdl:ApproveModifyUser>
</soapenv:Body>
</soapenv:Envelope>
Extract the Workitem ID (formatted like X Y ZZZ:WPDS) from the Step 1 response and insert it into the workItemId field below.
To Approve a Workitem:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://wsdl.ca.com/">
<soapenv:Header/>
<soapenv:Body>
<wsdl:ApproveModifyUser>
<wsdl:admin_id>MY_LOGIN_USER</wsdl:admin_id>
<wsdl:admin_password>MY_PASSWORD</wsdl:admin_password>
<wsdl:workItemId>X Y ZZZ:WPDS</wsdl:workItemId>
<wsdl:action>approve</wsdl:action>
</wsdl:ApproveModifyUser>
</soapenv:Body>
</soapenv:Envelope>
To Reject a Workitem:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://wsdl.ca.com/">
<soapenv:Header/>
<soapenv:Body>
<wsdl:ApproveModifyUser>
<wsdl:admin_id>MY_LOGIN_USER</wsdl:admin_id>
<wsdl:admin_password>MY_PASSWORD</wsdl:admin_password>
<wsdl:workItemId>X Y ZZZ:WPDS</wsdl:workItemId>
<wsdl:action>reject</wsdl:action>
</wsdl:ApproveModifyUser>
</soapenv:Body>
</soapenv:Envelope>