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定義有問題嗎
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/280089.html
標籤:Java相關
