I have a json below
"root":[
{
"refDataId": 1,
"children": [
{
"refDataId": 20
},
{
"refDataId": 99,
"otherValue": "Facility"
}
]
},
{
"refDataId": 2,
"children": [
{
"refDataId": 30
},
{
"refDataId": 99,
"otherValue": "Officer"
}
]
}
]
How to check the value above using the if statement in rule drools?
I edited the question. This is for drools rule
For example my rules is:
rule "test"
when
RuleEngine(inputObject!.adultHealth!.children contains 99)
then
info("children contains value 99");
end
And how to check the value of "refDataId": 99,
and "otherValue": "Officer"
?
If the value has to get from 2nd child json "refDataId": 2,