[rules-users] [rule-users]runtime polymorphic support?

Sikkandar Nawabjan Sikkandar.Nawabjan at ustri.com
Mon May 21 01:53:54 EDT 2007


Edson,
sorry for my confusing question. Yes am asked same question.
Related to this i have one more.
if my ClassA  is as abstract  will it work?
is there any constraints?
please clarify
Thanks and Regs,
basha
 
 
 
 
 
 
 
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 Hi,

   Sorry, I did not understood your question, but I guess you are asking
about facts matching ObjectTypeNodes of super classes. The answer is yes, it
works:

public class A {}
public class B extends A {}
public class C extends A {}

   If you have a rule saying

rule XXX
when
   A ()
then
  // do something
end

   The rule will fire for all facts of class A, B and C, as B and C are
subclasses of A. It is like if you did an "instanceof" to know what rules
will fire and what will not.

   Hope that is what you were asking.

   []s
   Edson

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070521/64f09d7a/attachment.html 


More information about the rules-users mailing list