drools条件匹配问题,求大佬帮忙

yef930 2021-04-25 04:05:54
drl规则我是这么定义的:
rule "callMeterPoweroffEvent"
agenda-group "poweroffCheck"
when
$fact :(KieFlowFact( actIndex < 0)
or KieFlowFact( execResult!.flowActName == FlowActEnum.PoweroffCheckAct.CALL_METER_POWEROFF_EVENT, execResult#FlowActExecResult.resultCode != 0, execTimes < 5)
)
then
$fact.setStatus(KieFlowFact.running);
$fact.setCurrRuleName("callMeterPoweroffEvent");
$fact.setSyncType(KieFlowFact.async);
$fact.setExecClassName("com.xinlian.workFlowServer.util.PoweroffCheckActExecutor");
$fact.setExecMethod("callMeterPoweroffEvent");
$fact.setBackHandleMethod("callMeterPoweroffEventBack");

end

我的KieFlowFact对象
{"actIndex":-1,"agendaGroup":"poweroffCheck","flowId":410000002020596,"matchStatus":"0"}
这样是可以匹配上这个规则的

{"actIndex":0,"agendaGroup":"poweroffCheck","execResult":{"flowActName":"callMeterPoweroffEvent","nextExecTime":1619337250000,"resultCode":304,"suspend":true},"execTimes":0,"flowId":410000002020596,"matchStatus":"0"}
这个对象为啥匹配不了??求解是我的drl定义有问题吗
...全文
114 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

51,407

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧