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

DSL Parser "eval"

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    Description

      rule "PatternTest"
      when
      $pli:Item( title matches "^Test\s*")
      then
      #
      end

      this one compiles but on Runtime it ends in an Exception when title looks for example like this "BlaBla (Test)".

      as workaround i thought about using the next part, but

      rule "PatternTest"
      when
      $pli:Item( eval(title.matches("^Test\s*")) )
      then
      #
      end

      it resolves into, also it shouldn't (because title.matches() is Java Code a shouldn't be parsed by the DSL Parser itself):

      SyntaxfehlerRule Compilation error : [Rule name=OnlineStreaming Start,
      agendaGroup=MAIN, salience=100, no-loop=true]
      com/p7s1/swi/phoenix/n24/Rule_OnlineStreaming_Start_0.java (19:923) :
      Invalid escape sequence (valid ones are \b \t \n \f \r \" \'
      )

      Attachments

        Activity

          People

            etirelli@redhat.com Edson Tirelli
            markush2007 markush2007 (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty