<br> Hi Brody,<br><br> What versions of Drools and MVEL you are using?<br><br> []s<br> Edson<br><br><div class="gmail_quote">2009/6/25 Brody bach <span dir="ltr"><<a href="mailto:brodybach@yahoo.com">brodybach@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hi,<br>
<br>
I have a class which implementes several interfaces<br>
<br>
class MyClass implements interA, interB, interC {<br>
private String nameA;<br>
private String nameB;<br>
private String ownString;<br>
<br>
public String getNameA(){ ---impl of method from interface interA<br>
return nameA;<br>
}<br>
<br>
public String getNameB(){ ---- impl method from interface interB<br>
return nameB;<br>
}<br>
<br>
public String getOwnString{ ---- own method<br>
return ownString;<br>
}<br>
}<br>
<br>
Another class, MyBiggerClass has MyClass as its attribute:<br>
<br>
class MyBiggerClass {<br>
private MyClass myClass;<br>
<br>
public MyClass getMyClass(){<br>
return myClass;<br>
}<br>
}<br>
<br>
In a rule, I use MyBiggerClass as follows:<br>
$mybig : MyBiggerClass()<br>
eval($mybig.getMyClass().getNameB().equals("HelloWorld"))<br>
<br>
The evaluation fails, and it said<br>
unable to resolve method using strict-mode: interA.getNameB()<br>
<br>
As you can see, the validator checks as if the getNameB was a method of<br>
interA (the first interface).<br>
I'm wondering whether this is a bug, or do I have to somehow change the<br>
structure of my class.<br>
But the question is, why does it check the interfaces not the class itself?<br>
<br>
Thanks for advices<br>
<br>
Regard<br>
bb<br>
<font color="#888888"><br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Validation-in-Guvnor-fails-due-to-unrecognized-method-of-implemented-interface-tp24203665p24203665.html" target="_blank">http://www.nabble.com/Validation-in-Guvnor-fails-due-to-unrecognized-method-of-implemented-interface-tp24203665p24203665.html</a><br>
Sent from the drools - user mailing list archive at Nabble.com.<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" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>