Please see a previous message I sent to the list.
You need a constraint that asymmetrically "orders" the events, so they
can match one way but not the other:
rule "Rules 1"
when
rt: Event( name1 : name == "SimpleEvent", id1 : id )
ru: Event( name2: name == name1, id2 : id > id1 )
then
System.out.println("Rule matchs");
end
Note the id>id1 in the above rule.
[]s
Edson
2007/5/25, Nicolas Carlier <carlier.nicolas(a)gmail.com>:
Hy,
Sorry i begin with Jboss rules. But imagine that i have this rule:
rule "Rules 1"
when
rt: Event( name1 : name, id1 : id, name == "SimpleEvent" )
ru: Event( name2: name, id2 : id, name == name1)
then
System.out.println("Rule matchs");
end
And that assert 2 objects "Event", with the same attribute name (here
"SimpleEvent") .
How to do that the rule wasn't executed twice ?
Thanks,
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com