Using external database in form (SELECT and INSERT data)

1
0
-1

We have a rather peculiar case study.

Our application, needs to load some data from external databases while also keeping information in the default HBase database.

Some data that are to be loaded are in the form of lookups.

To be more concrete, we have Customers, each having a status (Active, Interested, Not interested), and also living in a City.

Our Business Data Model, is:

Customer (CustomerName, Description, PhoneNumber, ..., CityId)
*City (Id, Name)
Status(Id, StatusName)

However, CityId must come from an external database, a custom CRM system that we are using. Therefore, IDs must be exactly the same (CityId in Bonita with Id from the table City of that database).

The form that we have generated basically lists all fields from the Customer BDM and displays a dropdown for the City. However, we are unable to load data into the dropdown.

Our implementation in the process is to create a business variable (pool variable) for the Customer model. We have also created a contract from this customer variable and generated a form from the contract.

We are also able to create a connector that loads the data from the external source, and save that data into another business variable (cities List). However, we find it impossible to display such data in our form. Any suggestion on how we can display these data in our form?

*I am also aware that in the BPM, the City model might not be needed.

The next question is how to insert the form data (QuoteText, Amount, CustomerId...) from the form to the external database?

1 answer

1
0
-1

Hello,

if I understand well you have a BDM object Customer, and you want to populate it with a city information. id and name of the city are stored in an external database (city reference table).

You should create a rest api extension that retrieves the city information from the external database, and use it in a form through the variable of type "External api".

I'd reccomend you to setup the datasource of the external database in Tomcat in order to have an efficient datasource connection.

Cheers

Notifications