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}"


2007/10/8, Markus Helbig <>:
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"
             $p : of type Item
                - Title equals "test"
                - Event equals "test"

resolves to (could be seen in the drl viewer)

rule "Your First Rule"

                $p :Item( eval( title.isEqual("test", eval(id.isEqual("test") ) )


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.


rules-users mailing list

  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @