How to retrieve object attributes in an object(BDM)?

1
0
-1

Hi everybody,

I have a BDM called VendorRequest like this: here

And the question derives from the selected row: BU(BusinessUnit) is another class I defined earlier.

At the submit form where the user fills the VendorRequest form, I can successfully choose the BusinessUnit information, which presents as BU_PID in my H2 database like this.

So here's the problem: how do I retrieve the BU or just the PID of it at the front-page? I got the pool variable "request" through "../{{context.request_ref.link}}" and I've tried "request.BU", "request.BU_PID", "request.BU.persistenceId" to show something in my input area, but all failed.

2 answers

1
+1
-1
This one is the BEST answer!

Hi,

I think I understand better what you want to do. You will need to use a "findBy" request in a variable to retrieve the BDM information and display it. With Bonita 7.10 there is an easy way to do it directly in UI Designer, with a wizard.

To make sure I understood correctly, I have created this small tutorial video to show you how to do it.

I hope it helps.

1
0
-1

Hi,

If I understand well, you want to retrieve the attributes from your BDM object and show them on your form?

If you are using Bonita 7.9 or 7.10 you can define the business variable to be displayed on your forms from Bonita Studio. Everything is explained in the dedicated video available on YouTube (First topic)

I hope it answers your question, if it the case I'll let you validate my answer. Otherwise feel free to get back to me.

Comments

Submitted by dongjun.yang_1417874 on Fri, 02/14/2020 - 16:30

Hi, I'm sorry I didn't make myself clear. What I was asking is how to retrieve an attribute, which is an object(BDM) called "BU" in my case, from a BDM( which is "Request" here)?

I know how to get the plain attributes( those primitive types like int, string), and as for this object-like attribute, I got only its ID in the "Request" table. So once I got the "Request" object at the front-page via API, how do I present its "BU" in an input field? I used to get the "BU" from a single "Request" at the backend by Groovy, but now our goal is to display all "Request" at the same time. There will be a modal to show all information of selected "Request", but I find no way to display the correspoing "BU".

Notifications