On 15 January 2011 11:32, Evert Penninckx <evert.penninckx@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 ...).
Overloading getLikes() would be more elegant. Still, for me these are
workarounds.
Would it be that strange or unconventional to have the from only match on
the required subclass?
Grtz
Evert
Wolfgang Laun-2 wrote:
>
> If smell is a property of Cheese and not just of FrenchCheese you could
> use
>
>
> when
> $person : Person ()
> $c: Cheese( eval( $c instanceof FrenchCheese), smell == "good" )
> from
> $person.getLikes()
> then
>
> Also, I think that a selective retrieval with an overloaded version of
> getLikes():
> getLikes( Class clazz )
> might be useful, avoiding useless elements in the returned collection.
>
> -W
>
>
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/About-for-and-inheritance-tp54110p2260831.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users