Add variable to json

Hi all!

Actually use Bonitasoft community 7.5.4, well I create a form in the automatically generated UI with the contract.

Also create a javascript variable to calculate the date automatically when starting the form, My quiestion is how can I add a variable to json output of the contract so that it adds that value in the BDM and to call it in another form?

How can I browse a JSON with Groovy ? How to use bodyAsObject ?


I have JSON data like :
"StartDate": "2018-08-30T00:00:00",
"EndDate": "2018-09-07T00:00:00"
"StartDate": "2018-06-30T00:00:00",
"EndDate": "2018-10-07T00:00:00"

I used a connector REST GET but I only got the full API so I use bodyAsString.split() to get the StartDate in a variable or the Title in an other variable.
But how can I use bodyAsObject to get the list of all StartDates and the list of all Titles ?

Thank You

Select Widget - How to pass two values ?

Hey guys,
In a select widget you can set the displayed key (in my case: E-Book), returned key (in my case: 490$) and the value (in my case $item.price).

My problem is, that I need to fill two variable, because on the next page I want to see what the customer choosed and what the price is. For now, I only see the price.
How can I set the name of the product (->E-Book) and the price (->50$), by selecting "E-Book"?

Different JSON structure in form


I'm new to bonita and JSON, I read a lot of posts on the forum but found no relevant infos on my problem.

I'm using a REST GET connector to fetch some infos from a webservice.
I have a process variable of HashMap type to witch I affect the result of the REST GET with "bodyAsObject".

If I test the webservice (with postman chrome extension), the JSON looks like :

Parsing contract variables coming from a form

Hi everybody,
I'm working in a process with a mailing connector. I have a form with a table widget to select some lines. When I select these lines I send them to a contract variable (multiple text). What I'm trying is parsing the content of this variable to fit data in the body of my email. At this moment I have only a beautiful string like this:
" [{persistenceId=111, .., field1=john, field2=snow,..}, {persistenceId=200, ..., field1=mary, field2=skye,..}] ".

I'm new in this kind of code. Perhaps someone could give me a way to try this.

Is it possible to create a list of information in JSON format in UI Designer?

I am displaying data that is brought into the database in some Dropdowns, as if it were some sort of shopping cart page from E-Commerce sites, at the moment my page looks like this:

Tengo un problema al mapear una variable (JSON) a una tabla de html. La variable de formulario es una collection java de datos complejos.

Hola a toda la comunidad de Bonita, soy nuevo en Bonita 7.2 y cualquier ayuda será agradecida.
Espero que tengan un buen día.

Este es el problema:
Creé un custom widget(widget persomalizado), con una tabla tipo <table> de HTML, y le paso un parámetro que es una collection de datos complejos, y siempre obtengo un erro de Angular de parseo, que también adjunto al final.
Estoy mostrando en un campo de texto el JSON con los valores, y es correcto.

I have an error when I map a form variable (JSON) to a table(HTML table tag). The form variable is a collection of complex data.

Hello to the hole Bonita community, I’m new in Bonita 7.2, any help will be appreciated.
I hope you a nice day.
This is the problem:

I created a custom Widget with an HTML table, I use a parameter, a Collection of Complex Data that I pass to the widget and I try to show it in the wdget But I always get an error.
I'm watching the vaue of the collection in a text field and it is a correct JSON.
This is the tempalte code:

Is there a connector to call RESTful webservice just like the SAOP webservice connector ?

Is there a connector to call RESTful webservice just like the SAOP webservice connector ?

display json in select box

I am having trouble displaying json objects in select box widget in ui designer. Earlier I was able to do this in Bonita 7, but now I can only list items in a String separated with commas. Can you tell me why is that?
Magdalina Civovic