流口水中的无环和主动锁定有什么区别 [英] what is the difference between no-loop and lock-on-active in drools

查看:74
本文介绍了流口水中的无环和主动锁定有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是使用无循环规则的示例:

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

rule "Even Number Rule"   
dialect "java"  
no-loop  
      when  
       n : Number( number !=0 && (number%2)==0 , value : number)  
    then  
        modify(n){setNumber(8)};  
      end


推荐答案

长话短说:


  • 无循环:避免重新激活由该SAME规则的RHS引起的规则。

  • 主动锁定:避免重新激活规则,不必担心是什么原因。

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

希望对您有所帮助,

这篇关于流口水中的无环和主动锁定有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆