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( &quot;plain routes: &quot; + $n );<br>end<br><br>And yet, it fails:<br>
<br>Exception in thread &quot;main&quot; org.drools.RuntimeDroolsException: java.lang.ClassCastException: rss.ixl.route.TrainStartGoalConn cannot be cast to java.io.Serializable<br><br>Sure, adding &quot;implements Serializable&quot; 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>