# How to cancel a case

**URL:** <https://community.ofelia.com/t/how-to-cancel-a-case/7905>\
**Category:** Q&A\
**Created:** [26 October 2016 19:43 UTC](https://community.ofelia.com/t/how-to-cancel-a-case/7905 "2016-10-26T19:43:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michele.DuBose](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Michele.DuBose](https://community.ofelia.com/u/Michele.DuBose)\
**Post date:** [26 October 2016 19:43 UTC](https://community.ofelia.com/t/how-to-cancel-a-case/7905/1 "2016-10-26T19:43:48Z")

</div>

Hi,

I have a case where one of the tasks failed. It seems when the task failed, my workflow stopped running. However, the case is showing as active. Therefore, I will like to cancel the case to remove its active state. As an administrator, in the portal, I see the option to delete a case. Is there an option to cancel?

---

<div class="post-metadata">

**Author:** ![dbravo](https://avatars.discourse-cdn.com/v4/letter/d/9fc29f/32.png) [@dbravo](https://community.ofelia.com/u/dbravo)\
**Post date:** [26 October 2016 22:20 UTC](https://community.ofelia.com/t/how-to-cancel-a-case/7905/2 "2016-10-26T22:20:58Z")

</div>

Hi,

The portal does not have that option (well on 7.1.2 It doesn’t, that’s the version that I use), you have to build your own process that makes your process instances cancelled and not deleted. Use the method `cancelProcessInstance` from the Engine API. ( [learn more here](http://documentation.bonitasoft.com/javadoc/api/7.3/org/bonitasoft/engine/api/ProcessRuntimeAPI.html#cancelProcessInstance(long)) )

I hope it helps,

Bye.
