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.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to