Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.29.0.Final, 7.30.0.Final, 7.31.0.Final
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
      None
    • Sprint:
      2020 Week 01-03 (from Dec 30)
    • Steps to Reproduce:
      Hide

      run

      mvn clean test
      

      on attached reproducer.

      Show
      run mvn clean test on attached reproducer.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      As of Drools 7.29.0.Final, forall patterns containing equality constraints on dates won't match as expected.

      For instance, given the following drl

          declare Fact
            d : java.util.Date
          end
          
          rule "forall with date"
          when
            forall(Fact(d == "01-Jan-2020"))
          then
          end
      

      and the following working memory:

          Fact( d=Wed Jan 01 00:00:00 CET 2020 )
          Fact( d=Wed Jan 01 00:00:00 CET 2020 )
          Fact( d=Wed Jan 01 00:00:00 CET 2020 )
      

      Drools <= 7.28.0.Final will fire 1 rule, whereas Drools >= 7.29.0.Final will fire 0 rules.

      This is probably due to the fact that the rewriting implemented in DROOLS-4632 fails to negate the constraint on the date, as visible in the attached picture of the network.

      I am wondering whether there would be an equivalent problem with any constraint on dates (e.g., >=, <=, ...)?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                mcasalino Matteo Casalino
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: