Hi all
I am a newbie at Bonita 7.2, and my doubt is:
I have a select of items with some researchers, and I want to select one of then, them push a button to add this to the Table widget. In the next step I want to select another different researcher from the select, and push again in the Add button and then automatically add this element to the same table widget, in this way I want to continue adding elements to this table Widget.
I have tried it with the field/property “Action” of the button, selecting the value “Add to a collection”, and certainly it adds elements to the collection because I display it in a text field/JSON, but it doesn’t display this values in the Table Widget.
This is the list mapped with the Table Widget
Researchers selected:[ “Pedro Rodríguez Méndez”, “Luis Concepción del Castillo” ]
But the table is always empty.
I think I have to do something like these tutorials:
You can find an example on the link below, download and import the process.
https://github.com/Bonitasoft-Community/vacation-management-example
Basically, it uses the “selected row” variable from the table, and a request to the business object with the “context” of the task.
It works well.
If you want to create your own customized request within Bonita Engine, take a look at the following link :
https://github.com/Bonitasoft-Community/rest-api-sql-data-source
EDITED, New Information:
Sorry, let me explain better, the table does add new row, but this new row is empty, I suppose it is because the list that I am passing to the Table is a simple list like this:
Researchers selected:[ “Pedro Rodríguez Méndez”, “Luis Concepción del Castillo” ]
And I think it should be something like this to make it work:
Researchers selected:[
{
“name”: “Pedro Rodríguez Méndez”
},
{
“name”: “Luis Concepción del Castillo”
}
]
I think it is mandatory, a must, to give a hashMap to the table Widget, in the json, with the structure:
[{“key”:“value1”},{“key”:“valu2”}]
Thank you very much.
Any assistance would be greatly appreciated.
Kind regards,
Héctor