How to delete a task of an active workflow in Flowable

Hi,

I am trying to do the Rollback in flowable. I tried to create a new task and delete the existing one.

But I couldn’t delete the task of an active Process. Is there a way to achieve this?

The DELETE api call return /runtime/tasks/{taskid} returns 403 forbidden - task can’t be deleted as its part of rollback.

Thanks,
Esther

See my response to your other similar question

We’d need a definition of what you call rollback.

Tasks that are open in a process can’t be deleted - they can only be completed.
Deleting a task would leave the process in a ‘corrupted’ state - the execution does’t know where to go to (e.g. imagine doing doing this to a task that’s after a parallel gateway fork - what should the execution do?).

Have you looked at the process migration API? That might suit your use case.

Hi,

is there anyway to force cancel or complete the task if it has no outgoing sequence error.
(e.g the process were not design correctly and it has the no outgoing sequence error, how we can cancel the process or complete its task programmatically)

I have tried below method but getting the "No Outgoing sequence exception)
runtimeService.deleteProcessInstance(processInstanceId, deleteReason);