what is the difference between no-loop and lock-on-active in drools

前端 未结 1 800
萌比男神i
萌比男神i 2021-01-04 10:47

Here is an example of a rule that uses \"no-loop\":

rule \"Even Number Rule\"   
dialect \"java\"  
no-loop  
      when  
       n : Number( number !=0 &         


        
1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 11:27

    Long story short:

    • no-loop: avoid the re-activation of a rule caused by the RHS of that SAME rule.
    • lock-on-active: avoid the re-activation of a rule NO MATTER what the cause is.

    Long story: http://ilesteban.wordpress.com/2012/11/16/about-drools-and-infinite-execution-loops/

    Hope it helps,

    0 讨论(0)
提交回复
热议问题