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"
               rt: Event( name1 : name == "SimpleEvent", id1 : id )
               ru: Event( name2: name == name1, id2 : id > id1 )
               System.out.println("Rule matchs");

    Note the id>id1 in the above rule.


2007/5/25, Nicolas Carlier < >:

Sorry i begin with Jboss rules. But imagine that i have this rule:

rule "Rules 1"
                rt: Event( name1 : name, id1 : id, name == "SimpleEvent" )
                ru: Event( name2: name, id2 : id, name == name1)

                System.out.println("Rule matchs");

And that assert 2 objects "Event",  with the same attribute name (here
"SimpleEvent") .

How to do that the rule wasn't executed twice ?

rules-users mailing list

  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @