Before the corresponding process (P2), I check a few rules in a business rule task using DMN (P1). As a result of P1 I get a list (Process P1 = Business Rule Task; Result Variable = “myOutput”, Map Decision Result = collectEntries).
In P2, a service task, I now want to use the result list from “myOutput” in an external task worker using node.js. In the Camunda Cockpit I can see that this variable is of type “Object”, the value is a “java.util.ArrayList” in Serialization Data Format = “application/x-java-serialized-object”.
Can someone explain how I can use this list in my external task worker? If I follow the example of the web page (const myOutput = task.variables.getTyped(‘myOutput’);), then I only get the serialized value of type “Object”. I don’t know how to deserialize it in node.js.
Since I haven’t found an entry elsewhere yet, the solution is probably obvious, but unfortunately I don’t see it.
Thank you for your help,
Oliver
P.S.: Note: If I only have a single value in the output of P1 (Map Decision Result = singleResult), I get the deserialized value directly and can work with it. Only in case of “Map Decision Result = collectEntries” I get a serialized object.
OK, sometimes I need a little time to understand it.
But now and after a little research on defaultSerializationFormat I have made the appropriate property in the engine configuration (bpm-platform.xml) and now get my output values in JSON format.
@camORo hi , i have the same issue
i try to add those properties to bpm-platform.xml to be able to have only json not a serialized object
true
java.util.TreeMap
but everytime i add those properties to file , the engine refuse to start without any error
so how do you get json format ??
and here is a link to my issue : Deserialize map type in javascript