Stopping a batch job using a transaction

You can use the InfoSphere® MDM updateTask transaction to stop batch jobs from processing.

Procedure

  1. Determine the task ID and process ID of the batch job you wish to stop.
    When you start a batch job, this ID is displayed in the command console and also written in the $home/taskchain.txt file. If you have explicitly created the batch job, this value is the ProcessId attribute of the TaskBObj instance.
  2. Send an updateTask transaction request with the Stop task action (TaskActionType 14) to update the status of the task to Stopping.
    Note: For more information about the updateTask transaction, see the updateTask reference documentation.
    Note: For more information about when you can stop a batch job, see Batch job life cycle overview.

Example

The following sample updateTask XML request will stop the running task with a task ID of 1234787856 and a process ID of 1000051:
<?xml version="1.0" encoding="UTF-8"?>
<TCRMService xmlns="http://www.ibm.com/mdm/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.ibm.com/mdm/schema MDMDomains.xsd">
  <RequestControl>
    <requestID>6191413</requestID>
    <DWLControl>
      <requesterName>cusadmin</requesterName>
      <requesterLocale>en</requesterLocale>
    </DWLControl>
  </RequestControl>
  <TCRMTx>
    <TCRMTxType>updateTask</TCRMTxType>
    <TCRMTxObject>TaskBObj</TCRMTxObject>
    <TCRMObject>
      <TaskBObj>
        <TaskId>1234787856</TaskId>
        <TaskDefinitionId>80</TaskDefinitionId>
        <TaskCatType>8</TaskCatType>
        <PriorityType>100</PriorityType>
        <TaskOwnerRole>Bulk Processing</TaskOwnerRole>
        <TaskDueDate>2012-01-25 11:00:00.000</TaskDueDate>
        <ProcessId>1000051</ProcessId>
        <!-- STOP_TASK --> 
        <TaskActionType>14</TaskActionType>       
        <TaskLastUpdateDate>2012-01-26 02:34:06.0</TaskLastUpdateDate>
      </TaskBObj>
    </TCRMObject>
  </TCRMTx>
</TCRMService>