My workflow calls a service task which has a sleep time incorporated in it and then ends the process after completing the task.
When the task is waiting , I decide to end the process and hence call the deleteProcessInstance method.
After this,the jobs entries are deleted and my process instance is cancelled as expected.
But, after the specified sleep time is completed, the task proceeded to completion and the execution listener receives a end completion event .The cancelled process instance is now marked as complete which is wrong.
I would like to clarify as to why the activiti sends an end event to the listener after the workflow is cancelled?
Thanks