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

In constraints fail to compile if negated or inside a forall pattern

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 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 attached reproducer with:

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

      Description

      It appears that the KieBuilder fails to compile the following pattern:

          Pojo(!(x in (1,2,3)))
      

      returning the following error:

          Error Messages:
          Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
             text=Unable to Analyse Expression !(x in (1,2,3)):
          [Error: unexpected token: ,2]
          [Near : {... !(x in (1,2,3)) ....}]
      

      Furthermore, as of Drools 7.29.0.Final, the following form will also fail to compile:

          forall(Pojo(y==42, x in (1,2,3)))
      

      with the following error:

          Error Messages:
          Message [id=1, kieBase=defaultKieBase, level=ERROR, path=rules.drl, line=4, column=0
             text=Unable to Analyse Expression !(y==42) || !(x in (1,2,3)):
          [Error: unexpected token: ,2]
          [Near : {... !(y==42) || !(x in (1,2,3)) ....}]
      

      The latter is likely a consequence of the negation introduced by DROOLS-4632, DROOLS-4633

        Gliffy Diagrams

          Attachments

            Issue Links

              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: