[jboss-jira] [JBoss JIRA] Created: (JBRULES-2159) CLONE -DSL Parser "eval"

Neil Wallace (JIRA) jira-events at lists.jboss.org
Tue Jul 7 07:54:51 EDT 2009


CLONE -DSL Parser "eval"
------------------------

                 Key: JBRULES-2159
                 URL: https://jira.jboss.org/jira/browse/JBRULES-2159
             Project: JBoss Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler-DSL
    Affects Versions: 4.0.1
            Reporter: Neil Wallace
            Assignee: Edson Tirelli
            Priority: Minor
             Fix For: 5.0.1.FINAL


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 \" \' \\ )

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list