Canceling pending jobs

To cancel a job that has been scheduled but has not yet run, obtain a list of jobs that are either running or waiting in the queue and then issue the cancelJobOperation of the Administration Web Service.

You can only cancel a job that has not yet started.

To cancel a job for a data store:

  1. In a tool such as SOAP UI, access the web service for the specified data store:
    http://localhost:<port>/ws/admin/DataStore?wsdl
    where the host and port represent the Oracle Endeca Server on which the specified data store has been created and is running.
  2. Specify the listJobsOperation to the Administration Web Service, as in the following example:
    <admin:request xmlns:admin="http://www.endeca.com/MDEX/admin/1/0">
                    <admin:listJobsOperation/>
    </admin:request>
    

    The response contains a list of jobs that are running and jobs that are pending in the queue but have not started yet.

    Pending jobs that you can cancel are those for which isRunning is set to false and isCanceled is also set to false.

  3. Identify the job ID of the pending job you want to cancel, and issue the cancelJobOperation, as in the following example:
    <admin:request xmlns:admin="http://www.endeca.com/MDEX/admin/1/0">
       <admin:cancelJobOperation jobId="5"/>
    </admin:request>

    If the job ID that you provided is valid and the job has not yet started, it will be canceled. If the job has already been started, the response indicates that the job is already running.

    Note: If a job has been canceled in the data store, Studio will receive an HTTP 200 code (request successful), but the end user of the front-end application powered by Studio will see empty content.

Example

In this example of the Administration Web Service response, you can see that the job with the job ID 5 was canceled successfully:
<admin:response xmlns:admin="http://www.endeca.com/MDEX/admin/1/0">
   <admin:cancelJobStatus>
      <admin:jobId>5</admin:jobId>
      <admin:canceledJob>true</admin:canceledJob>
      <admin:canceledJobDetails>Job marked for cancellation</admin:canceledJobDetails>
   </admin:cancelJobStatus>
</admin:response>