CA Identity Manager - How to Resend Canceled IM tasks automatically

book

Article ID: 111476

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Governance CA Identity Portal

Issue/Introduction

If you need to call CA Identity Manager tasks "View Submitted Tasks", "Cancel a Task in Progerss" or Resubmit a Task" view TEWS web service, so this article provide some examples. 
It's possible use any webservice tool, as suggestion you can use soapui.


 

Environment

CA Identity Manager 12.6 sp7 or newer

Resolution


1) View submitted task search TEWS request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://tews6/wsdl">
   <soapenv:Header>
      <wsdl:ViewSubmittedTasksQueryTaskContext>
         <!--You may enter the following 11 items in any order-->
         <wsdl:admin_id>imadmin</wsdl:admin_id>
         <wsdl:admin_password>test</wsdl:admin_password>
      </wsdl:ViewSubmittedTasksQueryTaskContext>
   </soapenv:Header>
   <soapenv:Body>
      <wsdl:ViewSubmittedTasksQuery>
         <wsdl:ViewSubmittedTasksSubmittedTasksTab>
            <wsdl:SearchCriteria>
               <wsdl:Status>In Progress</wsdl:Status>
               <wsdl:InitiatedBy>uid=imadmin,ou=people,ou=im,ou=ca,o=com</wsdl:InitiatedBy>
            </wsdl:SearchCriteria>
         </wsdl:ViewSubmittedTasksSubmittedTasksTab>
      </wsdl:ViewSubmittedTasksQuery>
   </soapenv:Body>
</soapenv:Envelope>

Response will give list of Task which are in progress.

You can use multiple search criteria based on your requirements

2) To cancel or resubmit task, collect task id from response received from above request.

Cancel Task using TEWS:              

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://tews6/wsdl">
   <soapenv:Header>
      <wsdl:ViewSubmittedTasksQueryTaskContext>
         <wsdl:admin_id>imadmin</wsdl:admin_id>
         <wsdl:admin_password>test</wsdl:admin_password>
      </wsdl:ViewSubmittedTasksQueryTaskContext>
   </soapenv:Header>
   <soapenv:Body>
      <wsdl:ViewSubmittedTasksQuery>
         <wsdl:ViewSubmittedTasksSubmittedTasksTab>           
        <wsdl:TaskDetails>             
               <wsdl:TaskId>25744157-747fba26-878983a1-f5540f</wsdl:TaskId>
               <wsdl:CancelTask>True</wsdl:CancelTask>
            </wsdl:TaskDetails>
         </wsdl:ViewSubmittedTasksSubmittedTasksTab>
      </wsdl:ViewSubmittedTasksQuery>
   </soapenv:Body>
</soapenv:Envelope>


3) ReSubmitted TASK using TEWS:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://tews6/wsdl">
   <soapenv:Header>
      <wsdl:ViewSubmittedTasksQueryTaskContext>
         <wsdl:admin_id>imadmin</wsdl:admin_id>
         <wsdl:admin_password>test</wsdl:admin_password>
      </wsdl:ViewSubmittedTasksQueryTaskContext>
   </soapenv:Header>
   <soapenv:Body>
      <wsdl:ViewSubmittedTasksQuery>
         <wsdl:ViewSubmittedTasksSubmittedTasksTab>           
        <wsdl:TaskDetails>             
               <wsdl:TaskId>25744157-747fba26-878983a1-f5540f</wsdl:TaskId>
               <wsdl:ResubmitTask>True</wsdl:ResubmitTask>
            </wsdl:TaskDetails>
         </wsdl:ViewSubmittedTasksSubmittedTasksTab>
      </wsdl:ViewSubmittedTasksQuery>
   </soapenv:Body>
</soapenv:Envelope>