This is a bug in the DSL engine. May I ask you please to submit a JIRA for it?
Meanwhile, I advise you to avoid eval, since it is more performant and more clear to use regular constraints. The following grammar entries are equivalent to yours, but much more performant:
[when]- Title equals "{value}"=title == "{value}"
[when]- Event equals "{value}"=id == "{value}"
[]s
Edson
2007/10/8, Markus Helbig <
mhelbig81@googlemail.com>:Hi,
given the following DSL
[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
so this of course does not work because of the brackets in "eval"
How could i solve this problem? I need the two different eval
conditions, and sometimes they have to be combined.
Thanks
Markus
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com