流口水比较决策表中的两个对象 [英] Drools compare two objects in decision table
本文介绍了流口水比较决策表中的两个对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在DRL文件中包含以下代码
I have the following code in DRL file
rule "MyExample"
when
$eentity : ExampleEntity()
$sentity : SecondEntity( secondField == $eentity.getMainField())
then
System.out.println(true);
end
这是可行的,但我需要将其转换为电子表格表。我尝试了很多变体,但没人能用。如何在决策表中编写此规则?
This is works but I need to convert it to spreadsheet table. I tried so much variants but no one works. How can I write this rule in decision table?
推荐答案
使用单个条件列:
CONDITION
ExampleEntity($mf: mainField) SecondEntity
secondField == $mf /*param*/
Combine Ex with Sec on equal field values
x
/ * param * /
和 x
是一种用于获取为该行生成条件的技巧。
The /*param*/
and the x
is a hack to get the condition being generated for the row.
这篇关于流口水比较决策表中的两个对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文