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

GDT editor generates wrong DRL if operator 'contains' is used with string literal containing space

XMLWordPrintable

    • 2020 Week 49-51 (from Nov 30), 2020 Week 52-03 (from Dec 21), 2021 Week 04-06 (from Jan 25)
    • Hide

      1. click Insert Column
      2. select "Add Condition" and click Next
      3. select fact model for a Pattern and click Next
      4. select Formula for Calculation type and click Next
      5. select String property for Field and click Next
      6. select (no operator) for Operator and click Next
      7. set header and click Next
      8. insert a new row and input the following in a cell.

      contains "ABC DEF"
      

      9. Open Source Tab. generated DRL looks like :

      rule "Row 1 rule2"
      dialect "mvel"
      when
        $f : Fact( productId contains"ABC ( DEF" ) )
      then
      
      Show
      1. click Insert Column 2. select "Add Condition" and click Next 3. select fact model for a Pattern and click Next 4. select Formula for Calculation type and click Next 5. select String property for Field and click Next 6. select (no operator) for Operator and click Next 7. set header and click Next 8. insert a new row and input the following in a cell. contains "ABC DEF" 9. Open Source Tab. generated DRL looks like : rule "Row 1 rule2" dialect "mvel" when $f : Fact( productId contains"ABC ( DEF" ) ) then
    • Hide

      use Free Form DRL

      Show
      use Free Form DRL
    • Undefined
    • NEW
    • NEW
    • ---
    • ---

      Guided Decision Table editor generate wrong DRL when using 'contains' operator with a string literal containing space., which causes evaluation/build error like.

      [KBase: defaultKieBase]: [ERR 102] Line 7:45 mismatched input ')' in rule "Row 1 rule2"

              rh-ee-jomarko Jozef Marko (Inactive)
              rh-ee-jomarko Jozef Marko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: