[rules-users] eval

Markus Helbig mhelbig81 at googlemail.com
Mon Oct 8 10:45:25 EDT 2007


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



More information about the rules-users mailing list