[
http://jira.jboss.com/jira/browse/JBRULES-1262?page=comments#action_12399224 ]
Edson Tirelli commented on JBRULES-1262:
----------------------------------------
The problem is that DSL is working right as a pure text template engine and when looking
for the pattern, it indeed will get the innermost () pair and the is wrong. I don't
think we can fix that (unfortunately) based only on text templates. We need context
information.
My suggestion is that you apply your fix to your local build as this will help you get
around the problem.
The general fix though needs to understand exactly where in the text template is the
pattern and how to correctly add a constraint to it. Wanna try to fix the more general
case?
Thanks
DSL Parser "eval"
-----------------
Key: JBRULES-1262
URL:
http://jira.jboss.com/jira/browse/JBRULES-1262
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.1
Reporter: M H
Assigned To: Edson Tirelli
Priority: Blocker
Fix For: 4.0.5
[when]of type Item=Item()
[when]- Title equals "{value}"=eval(title.isEqual("{value}")
[when]- Event equals "{value}"=eval(id.isEqual("{value}")
[then]Log : "{message}"=System.out.println("{message}");
the dslr File:
expander Test.dsl
rule "Your First Rule"
when
$p : of type Item
- Title equals "test"
- Event equals "test"
then
#actions
end
resolves to (could be seen in the drl viewer)
rule "Your First Rule"
when
$p :Item( eval(title.isEqual("test",
eval(id.isEqual("test") ) )
then
#actions
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira