在以下规则中,我希望 Rule2 会触发,因为我正在将客户名称修改为mahesh。但是当我执行 Rule2 时没有触发但 Rule3 正在触发。我在这里有什么遗漏吗
rule "Rule1"
lock-on-active true
salience 95
when
$c:Customer($customerName:customerName)
then
System.out.println($customerName+" =======2========");
modify($c){
setCustomerName("mahesh");
}
System.out.println($customerName);
end
rule "Rule2"
lock-on-active true
salience 85
when
$c1:Customer($customerName:customerName=="mahesh");
then
System.out.println($customerName+" Rules Name is 1 - " + drools.getRule().getName());
$c1.setCustomerName("mahesh456");
update($c1);
end
rule "Rule3"
lock-on-active true
when
$c:Customer($customerName:customerName)
then
System.out.println($customerName+ "***** ");
end