# businessStatus filter not available in Query case instances

**URL:** <https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199>\
**Category:** Uncategorized\
**Created:** [April 15, 2025, 6:54am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199 "2025-04-15T06:54:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonio.pascual](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@antonio.pascual](https://forum.flowable.org/u/antonio.pascual)\
**Post date:** [April 15, 2025, 6:54am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199/1 "2025-04-15T06:54:00Z")

</div>

Hi,

I would like to query for cases with a specific `businessStatus` and certain variable values using the REST API.

I’ve noticed that with **GET** `/cmmn-runtime/case-instances`, I can filter by `businessStatus`, but not by variable content.  
On the other hand, using **POST** `/cmmn-api/cmmn-runtime/case-instances`, I can filter by variables, but the `businessStatus` filter seems to be ignored, which feels a bit inconsistent.

Is there a way to achieve this kind of combined filtering using the API?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [April 15, 2025, 7:25am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199/2 "2025-04-15T07:25:49Z")

</div>

Hey @antonio.pascual,

Which version of Flowable are you using?

If I look at our [CMMN Swagger Docs](https://documentation.flowable.com/latest/assets/core-swagger/cmmn.html#/Case%20Instances/listCaseInstances), I see that we have `businessStatus`, `businessStatusLike` and `businessStatisLikeIgnoreCase` as available options.

If I look at the [`CaseInstanceCollectionResource`](https://github.com/flowable/flowable-engine/blob/main/modules/flowable-cmmn-rest/src/main/java/org/flowable/cmmn/rest/service/api/runtime/caze/CaseInstanceCollectionResource.java), I can see that the `businessStatus` option was added in 6.8.0 (see [Added state query option + added missing query options in CMMN case i… · flowable/flowable-engine@c543fed · GitHub](https://github.com/flowable/flowable-engine/commit/c543fedc0a8f17ba70617fcbf376628c1e4c8ee6)) and the `businessStatusLike` and `businessStatusLikeIgnoreCase` options were added in 7.1.0 (see [Add more query options with like and like ignore case for case and pr… · flowable/flowable-engine@57655c8 · GitHub](https://github.com/flowable/flowable-engine/commit/57655c86f07a2676282710d69386528085ad6be4))

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![antonio.pascual](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@antonio.pascual](https://forum.flowable.org/u/antonio.pascual)\
**Post date:** [April 15, 2025, 7:49am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199/3 "2025-04-15T07:49:38Z")

</div>

Hi @filiphr,

Thanks for the response. I’m using version 7.1.0. Yes, you are right, in the `GET /cmmn-runtime/case-instances` I can filter by `businessStatus` and it works. What I’m trying to do is to filter by `businessStatus` using `POST /cmmn-query/case-instances`, that allows me to filter using variables at the same time.

Despite that the documentation says that I can use all possible filters available in list cases, or I’m missing something, or it is not working:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/a/aaece065125324984c779bc3c02dee296bda2159.png)

I have tried including the businessStatus, businessStatusLike, etc in the body or in the query string and they are ignored.

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/d/d0056c2363394b7642cb869f48f73de750980580.png)

Thanks.

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [April 15, 2025, 7:57am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199/4 "2025-04-15T07:57:42Z")

</div>

Sorry, I got confused a bit. For the GET you indeed can use `businessStatus`, `businessStatusLike` and `businessStatusLikeIgnoreCase`. For the POST you need to use `caseInstanceBusinessStatus`, `caseInstanceBusinessStatusLike` and `caseInstanceBusinessStatusLikeIgnoreCase`.

Cheers,  
Filip

---

<div class="post-metadata">

**Author:** ![antonio.pascual](https://avatars.discourse-cdn.com/v4/letter/a/a9adbd/32.png) [@antonio.pascual](https://forum.flowable.org/u/antonio.pascual)\
**Post date:** [April 15, 2025, 8:22am UTC](https://forum.flowable.org/t/businessstatus-filter-not-available-in-query-case-instances/12199/5 "2025-04-15T08:22:17Z")

</div>

Great, Thanks @filiphr!!
