Does it
not compile (in which case can you post the error)?
Or does
it not activate?
Hello,
Does anyone know why rule "GoodBye2" below does
not compile, but rule "GoodBye1" does compile using Drools 4.0.0?
The only difference is the "not". Shouldn't this be valid?
Thanks,
-Chris
package
com.sample
import com.sample.DroolsTest.Message;
import
com.sample.DroolsTest.Foo;
import java.util.List;
rule
"Hello World"
when
m : Message( status == Message.HELLO, message :
message )
then
System.out.println( message );
m.setMessage( "Goodbye cruel world" );
m.setStatus( Message.GOODBYE );
update( m );
end
rule
"GoodBye1"
no-loop true
when
m : Message( status ==
Message.GOODBYE, message : message, $foos: foos )
Foo(id == 10) from $foos
then
System.out.println (
message );
m.setMessage( message
);
end
rule
"GoodBye2"
no-loop true
when
m : Message( status ==
Message.GOODBYE, message : message, $foos: foos )
not Foo(id == 10) from $foos
then
System.out.println(
message );
m.setMessage( message
);
end