Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-6469

Forall with self-join and conjunction of constraints matches when not supposed to

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.56.0.Final
    • core engine
    • None
    • 2021 Week 25-27 (from Jun 21)
    • Hide

      run:

          mvn clean test
      

      on attached reproducer.

      Show
      run: mvn clean test on attached reproducer.
    • Undefined
    • NEW
    • NEW

    Description

      Forall clauses containing a pattern with self-join and a conjunction of constraints connected with && will match even when such constraints are not satisfied.

      For example, the following DRL:

          rule "Rule"
          when
          forall (f:Fact(tag == "X") Fact(this==f, value > 1 && value < 10))
          then
          end
      

      will match against the following fact:

          Fact( tag=X, value=42 )
      

      whereas it is not supposed to.

      Notice that the issue does not occur:

      • when running with executable model, or
      • if the constraints in the pattern inside the forall are connected with a comma instead of &&

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mcasalino Matteo Casalino (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: