[rules-users] issue with 'forall'

Salaboy salaboy at gmail.com
Wed May 12 19:43:11 EDT 2010


Hi Michal,
Can you paste here the information/output of your runtime logger?

- Ing. Mauricio Salatino -

On May 12, 2010, at 13:52, Michal Bali <michalbali at gmail.com> wrote:

> Hi,
>
> I have encountered the following problem with the latest Drools 5.1  
> SNAPSHOT
>
> I've created a sample Drools project and replaced the Sample.drl  
> with the following:
> --Sample.drl--------------------------------------
> package com.sample
>
> import com.sample.DroolsTest.Message;
>
> rule "Hello World"
> 	when
> 		forall( Message( )
> 			Message() )
> 	then
> 		System.out.println("executed");		
> end
> --------------------------------------------
> If I run the sample application  like this everything is fine -  
> "executed" is printed. However, if I modify the main method and  
> insert some additional fact just before the message fact is  
> inserted, like this:
> --DroolsTest.java-----------------------------------
> .....
> ksession.insert(new Object());
> ksession.insert(message);
> .....
> -----------------------------------------------------------
> then the rule won't fire any more.
>
> Please note that if you change the fact insertion order (first the  
> message then the Object) it will work as expected.
>
> Is this a bug or am I missing something? I can file a JIRA if needed.
>
> Thank you!
> Best regards,
> Michal
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users



More information about the rules-users mailing list