IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Developing client applications for BPEL processes and tasks > Developing EJB client applications > Developing applications for human tasks

Terminating a task instance

Sometimes it is necessary for someone with administrator rights to terminate a task instance that is known to be in an unrecoverable state. Because the task instance is terminated immediately, you should terminate a task instance only in exceptional situations.


Procedure

  1. Retrieve the task instance to be terminated.
    Task taskInstance = task.getTask(tkiid);
  2. Terminate the task instance.
    TKIID tkiid = taskInstance.getID();
    task.terminate(tkiid);

    The task instance is terminated immediately without waiting for any outstanding tasks.

Developing applications for human tasks