[rules-users] Interface and @key in declare

Findulas bernd at koester-warendorf.de
Thu Mar 29 11:38:54 EDT 2012


Hello,

I want to declare a new fact base on an interface, f.e.: (i leave away all
those publics)

interface BoInterface {
  int getId();
  void setId(int id);
}

when i declare the fact 

declare BoFact (
  bo : BoInterface @key
)

the system throws an exception the a class is expected but an interface is
found, when trying to
perform the equals method.

Is there a restriction that @key cannot be used in a declare?

Greetings,

Bernd

--
View this message in context: http://drools.46999.n3.nabble.com/Interface-and-key-in-declare-tp3868085p3868085.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list