# case context

**URL:** <https://community.ofelia.com/t/case-context/10852>\
**Category:** Q&A\
**Created:** [16 July 2021 21:56 UTC](https://community.ofelia.com/t/case-context/10852 "2021-07-16T21:56:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asma](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@asma](https://community.ofelia.com/u/asma)\
**Post date:** [16 July 2021 21:56 UTC](https://community.ofelia.com/t/case-context/10852/1 "2021-07-16T21:56:01Z")

</div>

Hello ,&nbsp;

i am new to bonitasoft&nbsp;

i've been trying to do a search on the case list by business data .

for exemple if i have a "request" form &nbsp;have this&nbsp;inputs {name , object }

so i want to search for cases where the request object is "request 1 " .

does anyone have an idea how to do that ?&nbsp;

thanks in advance .&nbsp;

---

<div class="post-metadata">

**Author:** ![nasrin788\_1384620](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nasrin788\_1384620](https://community.ofelia.com/u/nasrin788_1384620)\
**Post date:** [17 July 2021 09:15 UTC](https://community.ofelia.com/t/case-context/10852/2 "2021-07-17T09:15:17Z")

</div>

Hi

By using Rest API, you can access bdm variables:

`../API/bdm/businessData/:businessDataType/:persistenceId`

..`/API/bdm/businessData/com.company.model.`request`/1`

Also you can get request by name or object. You have to use proper query;

```
../API/bdm/businessData/com.company.model.request?q=findByName&p=0&c=10&f=name=John
```

---

<div class="post-metadata">

**Author:** ![asma](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@asma](https://community.ofelia.com/u/asma)\
**Post date:** [29 July 2021 14:59 UTC](https://community.ofelia.com/t/case-context/10852/3 "2021-07-29T14:59:23Z")

</div>

thank you for answering.&nbsp;

i've done that , but first i created a variable **Context** &nbsp; **../API/bpm/case/{{caseId}}/context** to get the link to the bussinessData of a case .

i created a script with a loop on the cases list and every loop it change the caseId&nbsp;. my problem is that the return of variable **Context&nbsp;** is not changing . so what i mean is that i got the same bussiness Data for every case .&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![nasrin788\_1384620](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nasrin788\_1384620](https://community.ofelia.com/u/nasrin788_1384620)\
**Post date:** [23 August 2021 07:01 UTC](https://community.ofelia.com/t/case-context/10852/4 "2021-08-23T07:01:49Z")

</div>

**Context** for process is unique but I can't understand why you do that!

In your script, different **case** have different **caseId** but variable name is similar for all cast (just value of variable are different).

I hope this can help you
