Just checked DMN cloud. Well done.
Need some help with Map input via REST api to evaluate DMN, hope you can help.
I have a DMN which uses a JUEL expression in the output “params.score+input1+input2”, where params.score is fed by the service task out param in the process and input1 & input2 are user inputs.
I could construct a quick unit test ( Ref: https://bitbucket.org/bkumar/dmn-test/raw/b042c59ddc3f55e53981ee5b01267108ebbe53e5/src/test/java/org/camunda/bpm/JobFlowUnitTest.java ) which works fine.
However when a REST request is fired it throws “Object is not deserialized” exception. Not quite sure if I am passing the map string correctly, tried various flavours but no luck. Hope you can thrown me a hint here.
Command:
curl -H “Content-Type: application/json” -X POST -d ‘{
“variables” : {
“params”: {
“type”: “Object”,
“value”: “{"score" : { "value" : 1000, "type" : "integer" }}”,
“valueInfo”: {
“objectTypeName”: “java.util.HashMap”,
“serializationDataFormat”: “application/json”
}
},
“input1” : { “value” : -50, “type” : “integer” },
“input2” : { “value” : -25, “type” : “integer” }
}
}’ http://localhost:9090/rest/engine/default/decision-definition/key/job-score/evaluate
Full source @ Bitbucket
Process definition image @ Cawemo | Welcome
Thanks for your valuable time.