# How to delete a task of an active workflow in Flowable

**URL:** <https://forum.flowable.org/t/how-to-delete-a-task-of-an-active-workflow-in-flowable/7351>\
**Category:** Uncategorized\
**Created:** [January 19, 2021, 8:16am UTC](https://forum.flowable.org/t/how-to-delete-a-task-of-an-active-workflow-in-flowable/7351 "2021-01-19T08:16:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Esther](https://avatars.discourse-cdn.com/v4/letter/e/8c91f0/32.png) [@Esther](https://forum.flowable.org/u/Esther)\
**Post date:** [January 19, 2021, 8:16am UTC](https://forum.flowable.org/t/how-to-delete-a-task-of-an-active-workflow-in-flowable/7351/1 "2021-01-19T08:16:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [January 19, 2021, 9:51am UTC](https://forum.flowable.org/t/how-to-delete-a-task-of-an-active-workflow-in-flowable/7351/2 "2021-01-19T09:51:55Z")

</div>

See my response to your other similar question

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

> [@Esther](#):
>
> But I couldn’t delete the task of an active Process.

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.

---

<div class="post-metadata">

**Author:** ![amstitan99](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/amstitan99/32/1228_2.png) [@amstitan99](https://forum.flowable.org/u/amstitan99)\
**Post date:** [January 31, 2023, 2:08pm UTC](https://forum.flowable.org/t/how-to-delete-a-task-of-an-active-workflow-in-flowable/7351/3 "2023-01-31T14:08:25Z")

</div>

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);
