# Retrieve BDM using ParentCaseID

**URL:** <https://community.ofelia.com/t/retrieve-bdm-using-parentcaseid/6496>\
**Category:** Q&A\
**Created:** [28 September 2015 13:59 UTC](https://community.ofelia.com/t/retrieve-bdm-using-parentcaseid/6496 "2015-09-28T13:59:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtdonovan](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtdonovan](https://community.ofelia.com/u/mtdonovan)\
**Post date:** [28 September 2015 13:59 UTC](https://community.ofelia.com/t/retrieve-bdm-using-parentcaseid/6496/1 "2015-09-28T13:59:17Z")

</div>

Hello Team,

Bonita 7.0.2  
java 1.7  
Windows 7

I need to be able to retrieve BDM data with parentCaseID and display in data table. I’m using the UI Designer to create this. I have a JSON object that I need to parse thru to get the parent case Ids, then need to call another service with storageId and model type to get BDM data associated.

How should I proceed?

- need to loop thru JSON object to get all parent IDs (can’t get this to return properly)
- with return value(s) above, call [http://localhost:8080/bonita/API/bdm/businessDataReference/{{parentCaseId}](http://localhost:8080/bonita/API/bdm/businessDataReference/%7B%7BparentCaseId%7D)}/{{name\_ref}}  
return storageId and model type  
– with returned values, call [http://localhost:8080/bonita/API/bdm/businessData/](http://localhost:8080/bonita/API/bdm/businessData/){{model link}}/{{storageId }} to retrieve BDM

Is the correct path?

Thank you

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [1 October 2015 15:32 UTC](https://community.ofelia.com/t/retrieve-bdm-using-parentcaseid/6496/2 "2015-10-01T15:32:44Z")

</div>

If you need to get business variable value from the top parent process instance (i.e. the root process instance) you don’t need any iteration.

I create a [process example](https://www.dropbox.com/s/gy935k30khqyk7b/TestParentChildBusinessVarDiagram-1.0.bos?dl=0) that demonstrate how to get the value of a business variable referenced in the root process instance.

---

<div class="post-metadata">

**Author:** ![mtdonovan](https://avatars.discourse-cdn.com/v4/letter/m/bc79bd/32.png) [@mtdonovan](https://community.ofelia.com/u/mtdonovan)\
**Post date:** [1 October 2015 17:28 UTC](https://community.ofelia.com/t/retrieve-bdm-using-parentcaseid/6496/3 "2015-10-01T17:28:32Z")

</div>

I’m developing a custom page that shows Task List. Each task is it own sub process with it own parent case id. I need to show some business data next to the process data. Therefore I need to iterate thru my Task List object to get all the parent case id (sub process ids) then call the bdm api to retrieve and show data.

Thanks
