bind table from json array


I'm a new in Bonita bpm. I receive data from my connector in the form as a json string.
There is like connector output param. I store this param like pool variable.
Then, i get this value with external api:

../API/bpm/activityVariable/{{taskId}}/response_rows[enter image description here][1]

I got json array like :


I can create json variable from this json and set it as a data source.
I see that everything works fine. But when I set the data as External API variable nothing is displayed in the table.

I use the expression of my variable and not a constant (a small button in the content setting).

How can I show json array as a table ? Is it possible in bonita system ?

1 answer


Did you find the answer to this. I'm facing the same issue.


Submitted by michele.pantano on Thu, 01/17/2019 - 17:12

me too

Submitted by mehrdad.behrooz... on Thu, 01/17/2019 - 21:25

The way I got around this is to create a JavaScript Expression variable that looped through the JSON reply from the API call and took out the information I wanted. I found that Bonita does not like reading through JSON arrays so while you could reference {{variable.detail}} if the JSON reply was {"name":"Jack", "address":"123 road"}, the same would work if the JSON that is returned is enclosed in [] - eg. [{"name":"jack", "address":"123 road"}].

Submitted by antoine.mottier on Mon, 01/28/2019 - 16:43

Can you maybe clarify what you are trying to achieve? Do you want to display some data in a Bonita task form? Or use the data as part of a connector execution? Recommendation might be different depending on your constraint (where and how data are currently stored) and what you are trying to achieve. So giving more indications about your use case will help me to provide a better answer. Thanks.