<br>&nbsp;&nbsp; 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.<br><br><div><span class="gmail_quote">2008/2/12, Andreas Langegger &lt;<a href="mailto:andreas.langegger@gmx.at">andreas.langegger@gmx.at</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear list members,<br><br>is it possible to match elements in the working memory based on their<br>declared type which means based on the Java &quot;interface&quot;?<br><br>Consider several interfaces like this one:<br><br>
interface A {<br>&nbsp;&nbsp;&nbsp;&nbsp;public String getX();<br>&nbsp;&nbsp;&nbsp;&nbsp;public void setX(String x);<br>}<br><br>and different implementation of the corresponding interfaces as AImpl,<br>BImpl, etc. Is it possible to write a rule such that:<br>
<br>rule &quot;let me match based on declared not the actual impl type&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; A( ... )<br>&nbsp;&nbsp;&nbsp;&nbsp;then ...<br>end<br>?<br><br>Another question: I have troubles with eclipse to get the Working<br>Memory View running. I remember it was necessary to focus a<br>
WorkingMemory object in the Variables view, but now I followed the<br>docs here <a href="http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html/ch05.html#d0e2524">http://downloads.jboss.com/drools/docs/4.0.4.17825.GA/html/ch05.html#d0e2524</a><br>
&nbsp;&nbsp;and it does not work either.<br><br>I&#39;m running Eclipse <a href="http://3.3.1.1">3.3.1.1</a> Build id: M20071023-1652 on Mac OS X 10.5<br><br>Thanks a lot!<br>Andy<br><br>----------------------------------------------------------------------<br>
Dipl.-Ing.(FH) Andreas Langegger<br>Institute for Applied Knowledge Processing<br>Johannes Kepler University Linz<br>A-4040 Linz, Altenberger Straße 69<br><a href="http://www.langegger.at">http://www.langegger.at</a><br><br>
<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;JBoss Drools Core Development<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>