cancel
Showing results for 
Search instead for 
Did you mean: 

Terminating process instance along with awaiting user tasks

agrawalanish
Champ in-the-making
Champ in-the-making

Hi,

Is below scenario possible using Activiti Engine -

Process is deployed and started. Process has user tasks (sub process with multi instances i.e. multiple user tasks). Is it possible to terminate  
specific process instance (i.e. even the awaiting user task(s) should get terminated along with the process instance)? If yes please let me
know how to achieve the same.

Thanks in Advance
Anish
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
Yes, see RuntimeService:

<code>
/**
   * Delete an existing runtime process instance.
   *
   * @param processInstanceId
   *          id of process instance to delete, cannot be null.
   * @param deleteReason
   *          reason for deleting, can be null.
   * @throws ActivitiObjectNotFoundException
   *           when no process instance is found with the given id.
   */
  void deleteProcessInstance(String processInstanceId, String deleteReason);
</code>