I'm not sure it's supported in our parser, but I think we should do it - either add support for it, or make it implement to the "." accessor. MVEL supports null safe navigation, which means it'll return false if a null value is returned from an accessor.Mark Thanks for the info - although it was not actually the solution to my problem, it prompted me to look again at my assertion that there were not any null values. In actual fact answerData[0] was null ( I should have been checking for answerData[100]) and this was causing the error. You modified syntax is much tidier; I'm now using the following format: $a : Answer(answerData[0] != null && answerData[0].value_str == "Valves")
"Sometimes you have property expressions which may contain a null element, requiring you to create a null-check. You can simplify this by using the null-safe operator:
user.?manager.name
This is functionally equivalent to writing:
if (user.manager != null) { return user.manager.name; } else { return null; }"
This prevents the prior null pointer exception. Thanks for your input. David -- View this message in context: http://drools.46999.n3.nabble.com/Condition-syntax-to-access-Map-tp3204429p3205961.html Sent from the Drools: User forum mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users