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.
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.
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 am also looking for a way to access the "BU_PID" attribute in the UI Designer. If you could let me know how this was achieved, I would very much appreciate it, as the video that seemed to contain the answer is now gone.
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".
Basically, you just search the object attribute with a given persistenceId of that VendorRequest, then you add the persistenceId and attribute name after the ../API/bdm/businessData/:your business data
Alternatively, you can change your BDM. You just store the persistenceId rather the whole object in it, therefore you get the persistenceId all the time at the front page, and then retrieve the corresponding BDMs via API calls.
Thank you for your response. I tried to load the foreign key via an API call, as you suggested but unfortunately that didn't work for me. I had tried to store the persistence ID as a custom attribute before, but that hadn't worked either.
Do you think you could share your BOS and BDM so I can see what your setup is?
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.