Insertelements is not inserting the objects

70 views Asked by At

I am trying to insert objects to be validated by Drools using insertelements. Below is the JSON format used.

{
  "commands": [ {
    "insert-elements": {
        "objects": [
            {
                "containedObject": {
                    "@class": "com.myspace.poc.check",
                    "sFirstName": "Person 1",
                    "fAppliedAmount" : 0,                       
                    "fLegalAmount" : 40 
                }
            },
            {
                "containedObject": {
                    "@class": "com.myspace.poc.check",
                    "sFirstName": "Person 2",
                    "fAppliedAmount" : 0,                       
                    "fLegalAmount" : 0
                }
            }
        ],
        "disconnected": false,
        "out-identifier": "checks",
        "return-object": true,
        "entry-point": "DEFAULT"
    }
  },    
  {
    "fire-all-rules":{}
  }
]
} 

Even I am getting the response as successful, not getting the suitable response. In this JSON, one object is valid and one is invalid as per the rule. Below is the output I am getting.

{
  "type" : "SUCCESS",
  "msg" : "Container POC_1.0.0-SNAPSHOT successfully called.",
  "result" : {
    "execution-results" : {
      "results" : [ ],
      "facts" : [ ]
    }
  }
}

Kindly help and let me know what am I missing. Will appreciate your help.

0

There are 0 answers