Please let me know how to use ".?" (null safe operator) in drools decision table(Spreadsheet). Attached my spreadsheet, where for mdcl object I need to add null safe operator. Please let me know if I need to add additional information, as I'm new to Drools.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The null-safe operator in Drools is !.
, not .?
- see the documentation. You can use it inside decision tables just as you would when writing rules.
In your example, change the condition from mdcl.MDCL_Health.get("MDCL").Value
to mdcl!.MDCL_Health.get("MDCL").Value
to only fire the rule if mdcl
is not null.