Hi,
I have a java.util.List variable with is set from a database connector.
I want to populate a form with the list above but i don’t know how get access to each one of data belong to my List variable.
Thank You.
Hi,
I have a java.util.List variable with is set from a database connector.
I want to populate a form with the list above but i don’t know how get access to each one of data belong to my List variable.
Thank You.
Hi,
I’m assuming you are using Bonita BPM 7.
First of all, if this is an option for you, I would recommend to use Business Data Model (BDM) feature to store your data.
In your form, declare a variable that is initialize with an external API call and set the URL to: …/{{context.myTestData_ref.link}} (replace “myTestData” with the name of your process business variable as declared in your process definition).
If usage of business data is not an option for you, you will need to build a custom REST API to query your database. Check Community GitHub for an example of custom REST API to run database queries using application server data source.
I prefer the first option.
what do you mean by ‘that is initialize with an external API call’?
Any exemple to share?
Thanks
You can take a look at documentation page that cover form (UI designer) variables.
To sum up, when you create a new variable for a form, you need to define how the default value will be set. Using the response of a REST call is one of the option. “context” is a variable available by default that includes URL to call in order to get business variables values.