Deleting a task from a running process

Hi! Sometimes if they submit the complete twice, the process is doubled as a task, and the whole app crashes. When i try to delete one task only out of 2 with taskService’s deleteTask, it says “The task cannot be deleted because is a part of a running process”.
Could i force a delete to a task somehow? I’ve already tried to suspend the process with runtimeService, before deleting, but the same thing happened.

Hi Pitket,

It should not be possible.

That’s expected behavior.

You can delete whole process instance.

Regards
Martin