Why would Drools get into infinite execution loop when I don't even use $modify

136 views
Skip to first unread message

Hasan Can Saral

unread,
Oct 10, 2017, 7:36:06 AM10/10/17
to drools...@googlegroups.com
I have a very simple rule as such:


declare SomeObj
    @role( event )
@timestamp( dateProperty )
end

rule "Rule0"
no-loop true
salience 10
when
$someObj : SomeObj( )
then
System.out.println($someObj.getId());
end
This is the only rule I have, and it is causing infinite execution loop. Now, I am aware that I don't have any constraints in the LHS and it would be very easy for Drools to get into infinite loop, but, I do not $modify the facts  at RHS, nor do I insert any new facts. In a same way,  $someObj : SomeObj( someProperty > 10 ) is entering the same infinite loop. So basically any matched fact causes an infinite loop. How can I overcome this? Thanks!

Mario Fusco

unread,
Oct 11, 2017, 10:53:28 AM10/11/17
to Drools Usage
Hi,

I don't see any valid reason why drools should enter in an infinite loop in your use case. Can you please send a complete reproducer so I could better understanding what is going wrong?

Thanks, 
Mario 

--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-usage/CAOL1D3EtcA4Gp8xp7bbyZyP2%2BpO5mueJ53D2ZhkqFybmcd5YnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages