can not call apis multiple time from the front-end

1
0
-1

Hello i am new to bonitasoft started working with company that uses this product.

i have to filter through data that requires to make multiple api calls so i wrote it in front-end (i do not know if using groovy script was better but i do not know) the way i do it is i make api calls with fetch in a loop.

the problem is that the response is delayed obviously and the application loads faster.

is there any way to fix this, i looked through the documentation but i could not find anything useful.

P.S i am using bonitasoft 7.8.4

1 answer

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

Hello,

The solution you search for is the Rest API Extension.

Instead, to call from the front end all the data, and prepare it, you can do that on the server-side, then return in one call all data you need. This saves time because:

* you have only one call. This is not really the time of one call, it's more because you serialize the call. Then, you have to wait for the result of the first call, you should have some javascript in the designer to extract information and send it to the second call, and so on.

* if data are big, you fetch this information on the front end, extract what you need to send the second call, and so on. Using the Rest API extension, this extract is done on the server-side, which can save time (and transfer less non useful data)

* in the Rest Api, you use the Bonita Java API, where you have more functions to get what you need.

Saying that, which API exactly do you call, and which one is "slow"? Is that a BDM call? Bonita Engine API?
Best,

Notifications