我有一个类Application,其中有一个CallPhones实例列表。
class Application() {
List<CallPhones> callPhonesList;
...
}
class CallPhones() {
Integer callTimes;
...
}
我想在所有大于10的实例callTimes
时触发规则。以下是规则:
rule "Application eligible"
when
app : Application()
forall(CallPhones(callTimes > 10))
then
// application is eligible
end
奇怪的是,规则总是触发,即使callTimes
为SET column_name = CASE WHEN ... THEN .. ELSE ... END
的实例也是5.我也尝试了this question的答案,但没有得到任何帮助。有什么想法吗?
答案 0 :(得分:1)
应该是
rule "Application eligible"
when
app : Application()
forall($temp:CallPhones(callUserTimes > 10) from app.callPhoneList)
then
// application is eligible
end