@ Esteban
 
i use update to  update my object  so that when my next rule is called 
it should receive the updated value  from the previous rule.
 
so  using
lock-on-active
will allow me doint that or not ??


 
On 5/13/10, Esteban Aliverti <esteban.aliverti@gmail.com> wrote:
If both rules are in the same agenda group you can use lock-on-active instead of no-loop: 
http://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-expert/html_single/index.html#d0e3717

 

 
Best, 

2010/5/13 Greg Barton <greg_barton@yahoo.com>

It is so because that's what you're telling the system to do. :)

The no-loop modifier only prevents a rule's conditions from infinitely re-evaluating the tuples modified by it's own action, not the actions of other rules.  So when rule "Area_EstimatedRval_test_10-01-09_12-31-14" modifies a Para_2483 it will be reconsidered by the conditions in "Area_EstimatesRval4_10-01-09_12-31-14".  The only way to prevent "Area_EstimatesRval4_10-01-09_12-31-14" from firing again is to craft it's conditions such that they're no longer true. (maybe "fid2329 != eid2143" since that contradicts what "Area_EstimatedRval_test_10-01-09_12-31-14" does, but I don't know if that makes sense for your rules.)

--- On Wed, 5/12/10, Puneet duggal <duggalpunit@gmail.com> wrote:

From: Puneet duggal <duggalpunit@gmail.com>
Subject: [rules-users] Problem in update() method
To: "Rules Users List" <rules-users@lists.jboss.org>
Date: Wednesday, May 12, 2010, 10:54 PM


 

hi frnds
i am having problem  with update() method when i call update method  from first rule
it calls  second rule and goes in infinite loop calling the second method rule again and again
why is it so ??


rule "Area_EstimatesRval4_10-01-09_12-31-14"
date-effective "01-Oct-2009" date-expires "31-Dec-2014"  salience 5
 no-loop true
  when
 objectP2483 : Para_2483( (fid2329>=0);
 
 then

 objectP2483.setFid2339(objectP2483.getFid2338() *3.1);update(objectP2483);

  rule "Area_EstimatedRval_test_10-01-09_12-31-14"
date-effective "01-Oct-2009" date-expires "31-Dec-2014"  salience 5
 no-loop true
  when
 objectP2483 : Para_2483( fid2339>0);
  then
 System.out.println("Area_EstimatedRval_test_10-01-09_12-31-14");
 objectP2483.setFid2339(objectP2483.getEid2143());
 
 update(objectP2483); end


 
-----Inline Attachment Follows-----

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
 


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
 

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users