Hi all,
I would need to specify a property as array of objects in the rest api processVariables…
I’d like to put an array of Objects each with its own fields (fileName, mimeType etc) but I could get only this:
Is there a way to get something like that?
Thank you in advance,
Bye
Fabio
What API is that you’re using? You should be able to use json serialization data format to put a process variable that can then be deserialized later. Something like,
curl --location --request PUT 'http://localhost:8080/engine-rest/process-instance/d41aa447-8f2c-11ea-9ac8-0242ac110002/variables/testvar' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "Object",
"valueInfo" : {
"objectTypeName": "java.util.ArrayList",
"serializationDataFormat": "application/json"
},
"value": "[{\"name\": \"amount\", \"operator\":\"gteq\", \"value\": 5 }, {\"name\": \"amount\", \"operator\":\"lteq\", \"value\": 200 }]"
}'
For more info on working with spin dataformats, see here.