我试图尽量减少我的队友必须做的代码量,因为他们既不知道 java 也不知道 mvel。我无法将它们作为决策表放置,因为我们在 RHS 中执行计算(然后),我想知道在指导规则中是否有办法做到这一点。请参阅下面的示例
rule "MyRule1"
ruleflow-group "score-calculation"
when
$case : Case( caseStatus == "LM" , $balance: balance != null, $cValue: cValue!= null, $lValue: lValue!= null)
then
$case.setScore(($lValue*.001*$balance)/($cValue));
end
rule "MyRule2"
ruleflow-group "score-calculation"
when
$case : Case( caseStatus == "NP" , $balance: balance != null, $cValue: cValue!= null, $lValue: lValue!= null)
then
$case.setScore(($lValue*.01*$balance)/($cValue));
end
...ETC