Uploaded image for project: 'Red Hat Decision Manager'
  1. Red Hat Decision Manager
  2. RHDM-1148

DrlParser fails to parse str[endsWith] operator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • None
    • None
    • BRE
    • None

    Description

      DrlParser fails parsing drl rules containing str operators.

      package com.pulse.mainruleset 
      
      rule rule2
      when
        s : String( this str[endsWith] "MAN" )
      then   
        insert (s);
      end
      

      Parsing rules without str work as expected.

      package com.pulse.mainruleset 
      
      rule rule1
      when
        s : String( )
      then   
        insert (s);
      end
      

      There's a reproducer attached. Just run:

      mvn test

      See after you run a test that builds a KieModule like `_04_buildNoStrWith` test on that reproducer DrlParser starts to work with those operators, you can see on `_05_parseStrWith` test that is run after `_04_buildNoStrWith` test .

      I can imagine that KieModule build do some kind of preprocessing of drl rules, and after that DrlParser do not fail.

      I suppose is related with launching or enabling `StringConditionInspector` but cannot see how.

      Attachments

        Issue Links

          Activity

            People

              mfusco@redhat.com Mario Fusco
              afanjula@redhat.com Alberto Fanjul Alonso
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: