Is it possible to search cases or tasks by the case variables values?
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.
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
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.
This is a Custom page, available in the Community, here
Sorry to not have give the link in the first reply,