Re: [rules-users] counting facts of a kind

2010-08-24 Thread Edson Tirelli
> > > Good to know. OTOH, is there any good reason for count() having an argument > at all? Just because all others have an argument? Nowadays, the uniform > signature could be (Object... objs) which would, e.g., permit you to write > count() without the dummy argument. Others, such as sum, average

Re: [rules-users] counting facts of a kind

2010-08-24 Thread Wolfgang Laun
>>> >>> Thomas >>> >>> >>> >>> *From:* rules-users-boun...@lists.jboss.org [mailto: >>> rules-users-boun...@lists.jboss.org] *On Behalf Of *Wolfgang Laun >>> *Sent:* 23 August 2010 12:17 >>> *To:* Rules Users Li

Re: [rules-users] counting facts of a kind

2010-08-23 Thread Edson Tirelli
t;> can be persisted >> >> >> >> Thomas >> >> >> >> *From:* rules-users-boun...@lists.jboss.org [mailto: >> rules-users-boun...@lists.jboss.org] *On Behalf Of *Wolfgang Laun >> *Sent:* 23 August 2010 12:17 >> *To:* Rules Users L

Re: [rules-users] counting facts of a kind

2010-08-23 Thread Wolfgang Laun
; *To:* Rules Users List > *Subject:* [rules-users] counting facts of a kind > > > > As simple as it gets: > > rule countHigh > when > $n : Number() from accumulate ( $sgc : StartGoalConn() count( $sgc ) ) > then > System.out.println(

Re: [rules-users] counting facts of a kind

2010-08-23 Thread Swindells, Thomas
ugust 2010 12:17 To: Rules Users List Subject: [rules-users] counting facts of a kind As simple as it gets: rule countHigh when $n : Number() from accumulate ( $sgc : StartGoalConn() count( $sgc ) ) then System.out.println( "plain routes: " + $n ); end And yet, it fails: Exce

[rules-users] counting facts of a kind

2010-08-23 Thread Wolfgang Laun
As simple as it gets: rule countHigh when $n : Number() from accumulate ( $sgc : StartGoalConn() count( $sgc ) ) then System.out.println( "plain routes: " + $n ); end And yet, it fails: Exception in thread "main" org.drools.RuntimeDroolsException: java.lang.ClassCastException: rss.ixl.ro