Hello,
I’m trying to start a very simple camunda process with one service activity but that service activity is supposed to use a variable which is a structured object.
I wrote my code to expect my variable to be of type com.fasterxml.jackson.databind.node.ArrayNode.
ArrayNode hddVariable = (ArrayNode) execution.getVariable(Variable.HDD.getKey());
I would like to start my process instance with the Camunda REST API using jersey-client but I haven’t been able to have camunda unserialize my json array into an ArrayNode.
The variable I send is something like that :
"hdd" : {
"type" : "Object",
"value" : "[{\"mntpoint\":\"pv.01\",\"size\":1,\"ondisk\":\"sda\",\"grow\":true,\"volgroup\":{\"name\":\"rootvg\",\"logvols\":[{\"name\":\"rootlv\",\"mntpoint\":\"/\",\"fstype\":\"ext4\",\"size\":4608},{\"name\":\"homelv\",\"mntpoint\":\"/home\",\"fstype\":\"ext4\",\"size\":128},{\"name\":\"nrblv\",\"mntpoint\":\"/nrb\",\"fstype\":\"ext4\",\"size\":256},{\"name\":\"optlv\",\"mntpoint\":\"/opt\",\"fstype\":\"ext4\",\"size\":2048},{\"name\":\"softlv\",\"mntpoint\":\"/software\",\"fstype\":\"ext4\",\"size\":3072},{\"name\":\"tmplv\",\"mntpoint\":\"/tmp\",\"fstype\":\"ext4\",\"size\":1024},{\"name\":\"varlv\",\"mntpoint\":\"/var\",\"fstype\":\"ext4\",\"size\":2048},{\"name\":\"varloglv\",\"mntpoint\":\"/var/log\",\"fstype\":\"ext4\",\"size\":1024},{\"name\":\"varlogaudlv\",\"mntpoint\":\"/var/log/audit\",\"fstype\":\"ext4\",\"size\":4096},{\"name\":\"swaplv\",\"mntpoint\":\"swap\",\"fstype\":\"swap\",\"size\":8192}]} } ]",
"valueInfo" : {
"objectTypeName" : "com.fasterxml.jackson.databind.node.ArrayNode",
"serializationDataFormat" : "JSON"
}
}
But I have :
Deserialization Error: Cannot deserialize object in variable 'hdd': SPIN-PLUGIN-01002 Fallback serializer cannot handle deserialized objects
How could I use ArrayNode in variables ?