Accessing the value of a multiple variable saved in arraylist to json in Bonita

I am using Bonita 7.6 Community edition. I have used a collection in my form to save a set of values to the variable defined in the contract. When I try to reference the variable (which is an array list) in order to convert it into a json and perform other operations, I get this value instead: values: [[com.company.model.BusinessVariableName@bb40064, com.company.model.BusinessVariableName@f96dc678]]. What does the @--- value stand for and how can I access the arraylist data in a json format?

I have looked at this documentation but haven't gotten much out of it: https://documentation.bonitasoft.com/bonita/7.6/bo-multiple-refs-tutorial

Hello

 When I try to reference the variable (which is an array list) in order to convert it into a json and perform other operations, I get this value instead: values:

Is that a SERVER issue or a FRONT issue?

1/ Check what you send to the server. Do a F12 in your browser and check what you have in the JSON

I assume you send correctly the correct JSON in the contract.

So, you have an operation to get this information and to explode it? Could you copy here this operation (Groovy source code) ? 

2/ copy the GROOVY code

Where do you see

 I get this value instead: values: [[com.company.model.BusinessVariableName@bb40064, com.company.model.BusinessVariableName@f96dc678]]. What does the @--- value stand for and how can I access the ArrayList data in a json format?

in the log file? This com.company.model.BusinessVariableName@bb40064, is a log to a Business Variable. So, do you do an operation like setting the BusinessVariable in the left part, and a contract in the right part?

2/ could you copy the log file?

Thanks

 

 

Sorry for the delay in my response @Pierre-yves Monnet.

Based on your statement of 'do you do an operation like setting the BusinessVariable in the left part, and a contract in the right part?' I realized I was not doing anything of the sort in the operations. So, I created a list to access the values in the multiple variable and when I logged the list variable, I was able to view the contents in a json array. Thanks!

Hello
Awesome! So, if you solved your issue, please mark the question as "answered" then it more easy to manage the list of questions, to focus on "still in progress" question to help people.