Both with 5.4.0 and 5.3.0 I can't reproduce the effect described by Ladd.
The inserts are of two Messages with Object body set to Person("...").
Knowledge Base is configured STREAM, but Message isn't an event.
-W
On 14/07/2012, Ladd <ladd(a)codemettle.com> wrote:
Thanks for the reply Mark! However, in my test situation I'm
never sending
Person objects, only Message objects. The payload of the message contains
the Person object. In my application there will be other types of payload
objects though.
In my test, Rule1a looks for messages containing persons:
> rule += "rule rule1a salience 100 \n";
> rule += " when \n";
> rule += " $m : Message( body.class == Person.class, $body : body ) \n";
>
> rule += " $p : Person() from $body \n";
> rule += " then \n";
> rule += " System.err.println( \"rule1a: Just found person \" +
> $p.getName() ); \n";
> rule += "end\n";
I tried your suggestion and rule1b never fired because Person never exists
in memory (only messages that contain persons).
My goal is to have a "catchall" rule that catches all messages that
haven't
been "caught" by other rules. So every message in evaluates at least one
rule to true. I figured rule with constraint "when Message()" with a low
salience would do that. Since 1a and 1b both evaluate to true in my test,
I
figured adjusting the salience would adjust the firing order.
Thanks for any insight you can offer!!!
- Ladd
--
View this message in context:
http://drools.46999.n3.nabble.com/Why-does-it-seem-like-salience-is-being...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users