Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2860

DSL: Adding constraints ("-") to facts with parens doesn't work correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 5.1.1.FINAL
    • None
    • drools-compiler-DSL
    • None
    • Hide

      With the following DSL:
      [when][]Test=Test((t==a || t==b) && c==d)
      [when][]-test2 = e==f

      the 'when':
      Test
      -test2

      becomes:
      Test( (t==a || t==b, e==f ) && c==d)
      instead of
      Test ((t==a || t==b) && c==d, e==f)

      Workaround: add a dummy constraint to the DSL, eg.:
      [when][]Test=Test((t==a || t==b) && c==d, a==a)

      Show
      With the following DSL: [when] []Test=Test((t==a || t==b) && c==d) [when] []-test2 = e==f the 'when': Test -test2 becomes: Test( (t==a || t==b, e==f ) && c==d) instead of Test ((t==a || t==b) && c==d, e==f) Workaround: add a dummy constraint to the DSL, eg.: [when] []Test=Test((t==a || t==b) && c==d, a==a)

    Description

      With the following DSL:
      [when][]Test=Test((t==a || t==b) && c==d)
      [when][]-test2 = e==f

      the 'when':
      Test
      -test2

      becomes:
      Test( (t==a || t==b, e==f ) && c==d)
      instead of
      Test ((t==a || t==b) && c==d, e==f)

      Attachments

        Activity

          People

            mproctor@redhat.com Mark Proctor
            mwhidden_jira Michael Whidden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: