[rules-users] Alternative to instanceof when matching against multiple concrete types under the same hiearchy?
Travis Smith
travis_smith at bnz.co.nz
Sat Sep 24 23:39:53 EDT 2011
I think this will work for your scenario:
declare Interface
end
declare ConcreteType1 extends Interface
end
declare ConcreteType2 extends Interface
end
rule "asdf"
when
OtherType( $member : member )
(
$type : ConcreteType1(this == $member)
or
$type : ConcreteType2(this == $member)
)
then
// do whatever with $member
end
--
View this message in context: http://drools.46999.n3.nabble.com/Alternative-to-instanceof-when-matching-against-multiple-concrete-types-under-the-same-hiearchy-tp3314751p3365867.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
More information about the rules-users
mailing list