Searching, Canceling, and Resubmitting Scheduled Tasks via TEWS for Identity Manager
search cancel

Searching, Canceling, and Resubmitting Scheduled Tasks via TEWS for Identity Manager

book

Article ID: 111476

calendar_today

Updated On:

Products

CA Identity Manager CA Identity Suite

Issue/Introduction

Use Task Execution Web Services (TEWS) to programmatically manage scheduled tasks in Identity Manager. This article details the SOAP requests required to search for in-progress tasks, cancel specific tasks by ID, and resubmit them for immediate execution.

Environment

Identity Manager 14.5 & 15

Resolution

  1. Search for Scheduled Tasks Use the following TEWS request to retrieve a list of tasks currently in the "Scheduled" state. This retrieves the TaskId required for subsequent operations.

    <!-- Replace placeholders with your actual user credentials --><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:Body>      <SearchTask xmlns="http://www.ca.com/iam/tews">         <Credentials>            <User>YourUsername</User>            <Password>YourPassword</Password>         </Credentials>         <Task>            <TaskName>Scheduled</TaskName>         </Task>      </SearchTask>   </soap:Body></soap:Envelope>
  2. Cancel a Scheduled Task Use the TaskId obtained from the search step to cancel the task.

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:Body>      <CancelTask xmlns="http://www.ca.com/iam/tews">         <Credentials>            <User>YourUsername</User>            <Password>YourPassword</Password>         </Credentials>         <Task>            <TaskId>xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxx</TaskId>            <Cancel>True</Cancel>         </Task>      </CancelTask>   </soap:Body></soap:Envelope>
  3. Resubmit a Canceled Task To execute a canceled task immediately, send a resubmit request using the original TaskId.

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:Body>      <ResubmitTask xmlns="http://www.ca.com/iam/tews">         <Credentials>            <User>YourUsername</User>            <Password>YourPassword</Password>         </Credentials>         <Task>            <TaskId>xxxxxxxx-xxxxxxxx-xxxxxxxx-xxxxxx</TaskId>            <Immediate>True</Immediate>         </Task>      </ResubmitTask>   </soap:Body></soap:Envelope>

Additional Information

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.