I am testing infinite loops using Modify keyword.
But it is not re triggering the rule.
Rule 1:
rule "Entitle for promotion"
when
$i: EmployeeFinancialFact(rating==Rating.ONE.getRating())
then
PromotionFact $promotion=new PromotionFact($i.getEmpID(),$i.getEmpName());
insert($promotion);
end
Rule 2:
rule "Print EmployeeFinancialFact name entitled for promotion"
when
$p: PromotionFact()
then
modify($p) {setSentForApproval(true);}
end
I am expecting RHS of rule 2 will re-trigger the rule 2 again but it is getting fired only once.
Can anyone please tell me the reason.
Disable property reactive in Kmodule.xml in Drools 7 by adding following lines:
<configuration>
<property key="drools.propertySpecific" value="ALLOWED"/>
</configuration>