Basha,
This is the correct behavior since both facts match both patterns (one
at a time). If you don't want them to fire 2 times, you need a way to tell
the engine there is an order on the facts. I.e., (A,B) is a valid tuple for
you, but (B,A) is not.
One way of doing that is if the fa
Edson,
With this code it is firing. But it is firing 2 times(u also got same 2 time
output). why is that? how we can avoid?
Thanks and Regss,
Basha
Sorry, my mistake. "this" is a reserved word in java (duh!!), and so you
need to use your own binding:
m : Message( $message1 : mess
Sorry, my mistake. "this" is a reserved word in java (duh!!), and so you
need to use your own binding:
m : Message( $message1 : message )
mdup : Message($message2:message==$message1,eval(mdup != m) )
You can't use mvel dialect, because in MVEL the operators "==" and "!="
will call the equal
i just use this sort of rule
rule "Hello World"
dialect "mvel"
when
m : Message( $message1 : message )
mdup : Message($message2:message==$message1,eval(this!=m) )
then
System.out.println("Rule Fired"+m +"::"+mdup );
System.out.println("Rule Fired"+$message1 +"::"+$message2 );
end