[rules-users] Match workingmemory elements based on declared type (interface)

Andreas Langegger andreas.langegger at gmx.at
Tue Feb 12 12:44:08 EST 2008


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





More information about the rules-users mailing list