[rules-users] endless loop even with "no-loop"
James Gu
jxgu at cnsh.delphi-tech.com
Wed Mar 23 07:30:01 EDT 2011
Hi, I am working on rule and found that it is very easy to cause endless
loop.
For example:
Rule 1 match status and update message.
Rule 2 match type and update message.
This will cause endless loop even I add "no-loop" on each rule. Is there
anyway to avoid this? for example: each rule only execute one time, or set a
maximum execute times.
rule "rule 1"
no-loop
when
m : Message( status == Message.HELLO)
then
System.out.println( "rule 1" );
m.setMessage( "update 1" );
update( m );
end
rule "rule 2"
no-loop
when
m:Message( type=="type1" )
then
System.out.println( "rule 2" );
m.setMessage( "update 2" );
update( m );
end
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/endless-loop-even-with-no-loop-tp2719917p2719917.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list