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

Executable model compilation fails with constraints containing static method calls

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 7.35.0.Final
    • core engine
    • None
    • 2020 Week 13-15 (from Mar 23)
    • Hide

      run

      mvn clean run
      

      on attached reproducer.

      Show
      run mvn clean run on attached reproducer.
    • NEW
    • NEW

    Description

      Executable model rule compilation fails on patterns containing Java static method calls as constraints

      Example of DRL that fails to compile:

          rule "Array asList"
          when Pojo(java.util.Arrays.asList(1,5,2,3).containsAll(integerList))
          then
          end
      

      or

          rule "collections disjoint"
          when $p : Pojo($boundList : integerList)     Pojo(id > $p.id, !java.util.Collections.disjoint( integerList , $boundList ))
          then
          end
      

      or

          rule "containsAll"
          when Pojo(integerList.containsAll(java.util.Arrays.asList(1,3)), integerList.size() == 2)
          then
          end
      

      All above examples work fine when compiling without executable model.

      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: