How to use null safe operator in drools decision table

天大地大妈咪最大 提交于 2020-01-05 20:42:21

问题


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.



来源:https://stackoverflow.com/questions/29947371/how-to-use-null-safe-operator-in-drools-decision-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!