# Cannot remove last process definition for an App

**URL:** <https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460>\
**Category:** Flowable Application\
**Created:** [August 27, 2018, 12:39pm UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460 "2018-08-27T12:39:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eesengin](https://avatars.discourse-cdn.com/v4/letter/e/c2a13f/32.png) [@eesengin](https://forum.flowable.org/u/eesengin)\
**Post date:** [August 27, 2018, 12:39pm UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460/1 "2018-08-27T12:39:55Z")

</div>

If there are more than one process definitions for an App and I remove one of them (and Publish the App), everything is fine and process definition is also deleted in the Flowable database (it is not accessible via Flowable API).

However, if there is only one process definition for an App and I remove that from the App, it seems that it is removed from the App according to the Flowable Designer, but it is still present in the database and can be accessed via Flowable API.

Do I perform something wrong or is there a bug?

---

<div class="post-metadata">

**Author:** ![tijs](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tijs](https://forum.flowable.org/u/tijs)\
**Post date:** [August 28, 2018, 10:58am UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460/2 "2018-08-28T10:58:33Z")

</div>

Hi,

Are you using the Flowable Modeler (browser based application) for the process modeling?  
If you publish an empty app from the Flowable Modeler then it won’t do anything.  
What is the use case of doing this?  
You can also delete deployments using the Flowable Admin app.

Best regards,

Tijs

---

<div class="post-metadata">

**Author:** ![f1910721](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@f1910721](https://forum.flowable.org/u/f1910721)\
**Post date:** [October 4, 2018, 3:40pm UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460/3 "2018-10-04T15:40:07Z")

</div>

let me explain the situation we had.  
we are using API and Modeller at the same time. We deploy some BPMNs using API and we check all these over Modeller or API but when we delete an app that has only one BPMN model, it is deleted from Modeller but not from API. In addition to that (another situation), let’s assume that we have an app which has only one BPMN model and if I delete the model (not app), everything seems OK on Modeller but not on API.  
Is that a bug or something else?

---

<div class="post-metadata">

**Author:** ![f1910721](https://avatars.discourse-cdn.com/v4/letter/f/96bed5/32.png) [@f1910721](https://forum.flowable.org/u/f1910721)\
**Post date:** [October 15, 2018, 9:10am UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460/5 "2018-10-15T09:10:09Z")

</div>

Could you please provide me a way to overcome the problem I faced?

---

<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:** [October 18, 2018, 8:49am UTC](https://forum.flowable.org/t/cannot-remove-last-process-definition-for-an-app/2460/6 "2018-10-18T08:49:15Z")

</div>

What do you mean ‘by API’? Once a process definition is deployed, it is stored as a Deployment/ProcessDefinition. The modeler uses Models. Thus, when deleting models, they will not delete the deployed artifacts. If you want to delete both, you’d need to programmatically delete both models and deployments at the same time.
