[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1970) Error expanding DSL when #-Character is in right-side of dsl-property
Norbert Ziegler (JIRA)
jira-events at lists.jboss.org
Tue Mar 10 10:09:22 EDT 2009
[ https://jira.jboss.org/jira/browse/JBRULES-1970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12456404#action_12456404 ]
Norbert Ziegler commented on JBRULES-1970:
------------------------------------------
I tried your fix with CR1 and it works.
So the above mentioned 2 points a) and b) are ok: a) works now after replacing # by \# in the right side of the property-file, b) still works.
But now a new problem occurs!
I do not now if it has been a bug or a feature in earlier release, but now it does not work anymore.
Problem as follows:
I wanted to generate a linebreak, so the value in the dsl-File contained an \n
Example:
[consequence][]this is a test {expression} with result {result} = IF {expression} \n THEN \n PRINT {result} \n END-IF
Before I got 4 lines. Now the result is a single line where simple that \n is replaced with the letter "n", no linebreak anymore.
Think this a consequence of this fix.
Question now: is there any way to generate linebreaks using a dsl?
In the Drools-doc you write:
<<<
chapter 7.10.3. Using a DSL in your rules
...You can also have the resulting rule expressions span lines...
<<<
but you do not explain how.
Please let me know and if necessary open a new bug.
> Error expanding DSL when #-Character is in right-side of dsl-property
> ---------------------------------------------------------------------
>
> Key: JBRULES-1970
> URL: https://jira.jboss.org/jira/browse/JBRULES-1970
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler
> Affects Versions: 5.0.0.M5
> Environment: Eclipse 3.4, jre6u10, WinXp
> Reporter: Norbert Ziegler
> Assignee: Edson Tirelli
> Fix For: 5.0.0.CR1
>
>
> Having a line in a DSL like following:
> [condition][]Bedingung-19-MKM4 = eval ( $p.getTempVal("#UML-ATZ-1") < $p.getZvUmlStfr() )
> Using "Bedingung-19-MKM4" in the LHS of a rule "Regel-151" in an dslr-File I get the following 3 errors:
> [12] Unable to expand: Bedingung-19-MKM4
> [ERR 103] Line 201:2 no viable alternative at input 'Bedingung' in rule "Regel-151"
> Unknown error while parsing. This is a bug. Please contact the Development team.
> The problem is the #-Character. If you change the line to
> [condition][]Bedingung-19-MKM4 = eval ( $p.getTempVal("UML-ATZ-1") < $p.getZvUmlStfr() )
> it works. But that's not what I need.
> Hint: maybe this is related to (JBRULES-1960) Syntaxcoloring wrong if DSLR contains a "#"-Character.
> But in this case it's more important because it's not an "optical" problem only.
> By the way: if I use the value #UML-ATZ-1 as an argument / placeholder it works (thank God, need this often). But using a placeholder is not what I need.
--
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