Hi Brody,

   What versions of Drools and MVEL you are using?

   []s
   Edson

2009/6/25 Brody bach <brodybach@yahoo.com>

Hi,

I have a class which implementes several interfaces

class MyClass implements interA, interB, interC {
     private String nameA;
     private String nameB;
     private String ownString;

     public String getNameA(){ ---impl of method from interface interA
          return nameA;
     }

     public String getNameB(){  ---- impl method from interface interB
          return nameB;
     }

     public String getOwnString{  ---- own method
          return ownString;
     }
}

Another class, MyBiggerClass has MyClass as its attribute:

class MyBiggerClass {
 private MyClass myClass;

 public MyClass getMyClass(){
      return myClass;
 }
}

In a rule, I use MyBiggerClass as follows:
$mybig : MyBiggerClass()
eval($mybig.getMyClass().getNameB().equals("HelloWorld"))

The evaluation fails, and it said
unable to resolve method using strict-mode: interA.getNameB()

As you can see, the validator checks as if the getNameB was a method of
interA (the first interface).
I'm wondering whether this is a bug, or do I have to somehow change the
structure of my class.
But the question is, why does it check the interfaces not the class itself?

Thanks for advices

Regard
bb




--
View this message in context: http://www.nabble.com/Validation-in-Guvnor-fails-due-to-unrecognized-method-of-implemented-interface-tp24203665p24203665.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com