On 15 January 2011 11:32, Evert Penninckx <evert.penninckx(a)gmail.com> wrote:
I thought I had an error from the drools plugin when using instanceof even
in eval, but I'll try that again, I think I tried eval(this instanceof
You cannot use this in an eval. The eval is "moved out" from the containing
and there this has no meaning.
Overloading getLikes() would be more elegant. Still, for me these are
Would it be that strange or unconventional to have the from only match on
the required subclass?
Given that getLikes() is *your *choice of method producing the data, and
FrenchCheese is *your *choice of type for the receiver: would it be that
or unconventional to expect you to employ matching types? ;-)
Type checking should not result in the silent elimination of data at
I would expect Drools to tell me is the incompatibility of the from and the
pattern, at compile time.
Wolfgang Laun-2 wrote:
> If smell is a property of Cheese and not just of FrenchCheese you could
> $person : Person ()
> $c: Cheese( eval( $c instanceof FrenchCheese), smell == "good" )
> Also, I think that a selective retrieval with an overloaded version of
> getLikes( Class clazz )
> might be useful, avoiding useless elements in the returned collection.
View this message in context:
Sent from the Drools - User mailing list archive at Nabble.com
rules-users mailing list