As simple as it gets:<br><br>rule countHigh<br>when<br> $n : Number() from accumulate ( $sgc : StartGoalConn() count( $sgc ) )<br>then<br> System.out.println( "plain routes: " + $n );<br>end<br><br>And yet, it fails:<br>
<br>Exception in thread "main" org.drools.RuntimeDroolsException: java.lang.ClassCastException: rss.ixl.route.TrainStartGoalConn cannot be cast to java.io.Serializable<br><br>Sure, adding "implements Serializable" to StartGoalConn fixes this. But why is this necessary?<br>
<br>FYI, StartGoalConn is abstract superclass of TrainStartGoalConn - just in case this has some bearing on this issue.<br><br>Best<br>-W<br>