Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
5.4.0.Final
-
None
Description
Declarations (like @role(event) ) in a declare-Section should apply to sub-classes of the declared class, too, but don't if the sub-class resides in a different package than the base class.
Attached you'll find an example which demonstrates the issue. The class ButtonEvent derives from VSCPEvent which is declared with @role(event). Running com.levigo.overlord.DroolsTest yields a java.lang.ClassCastException: org.drools.common.DefaultFactHandle which is caused by the ButtonEvent not being recognized as an event instead of a fact.
The Problem goes away if ButtonEvent is declared as an event (uncomment the section in overlord.drl or ButtonEvent is moved to the same package as VSCPEvent.
For more information see the referenced forum thread.