Identity Manager Approver Workflow: Retrieve Worklist and Manage Workitems via TEWS
search cancel

Identity Manager Approver Workflow: Retrieve Worklist and Manage Workitems via TEWS

book

Article ID: 252309

calendar_today

Updated On:

Products

CA Identity Suite CA Identity Manager

Issue/Introduction

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").

Environment

Identity Manager 14.x & v15

Resolution

Step 1: Retrieve the User Worklist

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>

 

Step 2: Approve or Reject a Workitem

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>

 

Note: If a task requires mandatory attributes (such as a Tax ID or FEIN) during approval, these must be included in the SOAP call matching the task's WSDL definitions.