Hi,
If I had a rule written in DSL using Drools 3.0 like;
1. [when] when1=r : ObjectA( )
2. [when] when2=eval(r.isApplication() || r.isBanker())
There are no attributes in class Object with name application and banker
but there are methods in ObjectA with names
Users List
Subject: Re: [rules-users] Minor Issue in writing DSL
Drools respects encapsulation, so it works with javabean method name
conventions. If you have a method isApplication() that returns a
boolean, does not matter how your class calculates the return value.
Same for any other method
Drools respects encapsulation, so it works with javabean method name
conventions. If you have a method isApplication() that returns a boolean,
does not matter how your class calculates the return value. Same for any
other method. In 4.0, you can write:
ObjectA( application == true || banker ==
Tirelli
*Sent:* Tuesday, August 21, 2007 1:56 PM
*To:* Rules Users List
*Subject:* Re: [rules-users] Minor Issue in writing DSL
Saleem,
For sure, your mapping must have some typo or mistake. A rule like this
works and is correct:
rule XYZ
when
ObjectA( application==true || banker