Yes, that is how it works. Declare the pattern as any class or interface
name and it will try to match any fact in the working memory that implements
that interface or derive that class.
2008/2/12, Andreas Langegger <andreas.langegger(a)gmx.at>:
Dear list members,
is it possible to match elements in the working memory based on their
declared type which means based on the Java "interface"?
Consider several interfaces like this one:
interface A {
public String getX();
public void setX(String x);
}
and different implementation of the corresponding interfaces as AImpl,
BImpl, etc. Is it possible to write a rule such that:
rule "let me match based on declared not the actual impl type"
when
A( ... )
then ...
end
?
Another question: I have troubles with eclipse to get the Working
Memory View running. I remember it was necessary to focus a
WorkingMemory object in the Variables view, but now I followed the
docs here
http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html/ch05.html#d0e2524
and it does not work either.
I'm running Eclipse 3.3.1.1 Build id: M20071023-1652 on Mac OS X 10.5
Thanks a lot!
Andy
----------------------------------------------------------------------
Dipl.-Ing.(FH) Andreas Langegger
Institute for Applied Knowledge Processing
Johannes Kepler University Linz
A-4040 Linz, Altenberger Straße 69
http://www.langegger.at
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com