如何在 drools 决策中使用 null 安全运算符 table

How to use null safe operator in drools decision table

请告诉我如何使用“.?” (空安全运算符)在 drools 决策 table(电子表格)中。附上我的电子表格,我需要为 mdcl 对象添加 null 安全运算符。如果我需要添加其他信息,请告诉我,因为我是 Drools 的新手。

Drools 中的空安全运算符是 !.,而不是 .? - 请参阅 documentation。您可以像编写规则时一样在决策表中使用它。

在您的示例中,将条件从 mdcl.MDCL_Health.get("MDCL").Value 更改为 mdcl!.MDCL_Health.get("MDCL").Value 以仅在 mdcl 不为空时触发规则。