Is it possible to search cases or tasks by the case variables values?


Is there a way to find process instances throught their case variables values?

2 answers



This is not possible, even by the API. In the database, variables are serialized, so you can build a SQL Request to request if the variable is a LONG, INTEGER, DOUBLE, DATE but not if this is a String.

The best option is:

* use a StringIndex. You have up to 5 String Index per process. You can search via the Portal a Case by a Stringindex (not a task). Via the API, you can search a Case, then a Task.

* use a BDM variable: you can search by any attribute in the BDM

then, you have to save in the BDM the caseID, else you don't have any mechanism to retrieve the case (two information are independent)

Hope this help,


Thanks Pierre... It helped... but... Can I use StringIndexes in the Community Edition? Can you point me to the documentation point where it explain how to use that feature? I was unable to find by myself.
I'm using the rest API to interact with Bonita, through a Node.js application.

Thank you.


Submitted by Pierre-yves Monnet on Thu, 09/17/2020 - 20:50

Hello, I double-check and the Stringindex is a Subscription Feature. So the best is is to use a BDM or an external database, and save in the BDM (or external database) the information you want to search AND the caseid. Best

Submitted by alexgv99_1404063 on Fri, 09/25/2020 - 15:54

BDM implies in deploy a new version of my flow... I was trying to avoid that... anyway, thank you for the time you spent to help me out.

Submitted by Pierre-yves Monnet on Fri, 09/25/2020 - 22:38

So, you could try to query directly on the database.

Process is store in the PROCESS_INSTANCE. Then you can link with the DATA_INSTANCE table, where data are stored. If it is a string, you can find it in the column CLOB value the content.

Using the Gasoline page, you should be able to realize your query, or via a REST API Extension, connecting the Bonita Datasource. it should work, you have to test it.

Submitted by alexgv99_1404063 on Wed, 10/14/2020 - 15:43

I'm sorry... "Gasoline Page"?

Submitted by Pierre-yves Monnet on Wed, 10/14/2020 - 22:23

This is a Custom page, available in the Community, here

Sorry to not have give the link in the first reply,


Submitted by alexgv99_1404063 on Thu, 10/15/2020 - 03:00

Ok... thank you Pierre-yves Monnet.

I was able to install it from the Resources tab in Portal (as admin), but I can't find the page... what is the url to access it?
I'm testing in localhost:8080, before I install it in my development server.

Submitted by Pierre-yves Monnet on Mon, 10/19/2020 - 22:21


You have to create an application or a profile.

Visit the PY Tutorial : !