I did record all the events that were thrown as a result of call to runtime.deleteProcessInstance(instanceId, deleteReason). I had configured the activitilistener as follows :
<extensionElements>
<activiti:eventListener class="WorkflowListener" entityType="process-instance" />
</extensionElements>
For the above configuration, following events were thrown:
********************************* ENTITY_DELETED
********************************* ENTITY_DELETED
********************************* ENTITY_DELETED
I changed the configuration as follows:
<extensionElements>
<activiti:eventListener class="WorkflowListener" />
</extensionElements>
The following events were emitted for the above configuration:
********************************* ACTIVITY_CANCELLED
********************************* ENTITY_DELETED
********************************* HISTORIC_ACTIVITY_INSTANCE_ENDED
********************************* HISTORIC_ACTIVITY_INSTANCE_ENDED
********************************* HISTORIC_ACTIVITY_INSTANCE_ENDED
********************************* HISTORIC_PROCESS_INSTANCE_ENDED
********************************* ENTITY_DELETED
********************************* HISTORIC_PROCESS_INSTANCE_ENDED
********************************* ENTITY_DELETED
********************************* ENTITY_DELETED
********************************* HISTORIC_PROCESS_INSTANCE_ENDED
********************************* ENTITY_DELETED
I do not see anywhere PROCESS_CANCELLED event. The documentation for PROCESS_CANCELLED states as below:
/**
* A process has been cancelled. Dispatched when process instance is deleted by
* @see org.activiti.engine.impl.RuntimeServiceImpl#deleteProcessInstance(java.lang.String, java.lang.String), before
* DB delete.
*/
Am I missing something here.