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

**URL:** <https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399>\
**Category:** Q&A\
**Created:** [15 September 2020 18:59 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399 "2020-09-15T18:59:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [15 September 2020 18:59 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/1 "2020-09-15T18:59:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [16 September 2020 19:19 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/2 "2020-09-16T19:19:56Z")

</div>

Hello,

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.

&nbsp;

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,

---

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [17 September 2020 05:02 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/3 "2020-09-17T05:02:10Z")

</div>

Thanks Pierre... It helped... but... Can I use&nbsp;StringIndexes&nbsp;in the Community Edition? Can you point me to&nbsp;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.

---

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [17 September 2020 18:50 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/4 "2020-09-17T18:50:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [25 September 2020 13:54 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/5 "2020-09-25T13:54:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [25 September 2020 20:38 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/6 "2020-09-25T20:38:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [14 October 2020 13:43 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/7 "2020-10-14T13:43:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [14 October 2020 20:23 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/8 "2020-10-14T20:23:08Z")

</div>

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

http://community.ofelia.com/project/pagegasoline

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

Best

---

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [15 October 2020 01:00 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/9 "2020-10-15T01:00:43Z")

</div>

Ok... thank you&nbsp;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.

---

<div class="post-metadata">

**Author:** ![Pierre-yves\_Monnet](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@Pierre-yves\_Monnet](https://community.ofelia.com/u/Pierre-yves_Monnet)\
**Post date:** [19 October 2020 20:21 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/10 "2020-10-19T20:21:12Z")

</div>

Hello,

You have to create an application or a profile.

Visit the PY Tutorial :&nbsp;[https://youtu.be/GDw2FVuiTqE](https://youtu.be/GDw2FVuiTqE)&nbsp;!

---

<div class="post-metadata">

**Author:** ![alexgv99\_1404063](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@alexgv99\_1404063](https://community.ofelia.com/u/alexgv99_1404063)\
**Post date:** [20 October 2020 20:24 UTC](https://community.ofelia.com/t/is-it-possible-to-search-cases-or-tasks-by-the-case-variables-values/10399/11 "2020-10-20T20:24:34Z")

</div>

Thank you Pierre-yves Monnet... it worked.
