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

Forall with self-join and "not in" constraint matches when not supposed to

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.57.0.Final, 7.58.0.Final
    • core engine
    • None
    • 2021 Week 34-36 (from Aug 23)
    • 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 "not in" constraint will match even when such constraint is not satisfied.

      For example, the following DRL:

          rule "Rule"
          when
          forall (f:Fact(tag == "X") Fact(this==f, value not in (1, 42) ))
          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.

      This looks related to DROOLS-6469, but still affects Drools 7.57.0.Final and above.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: