>
>
> 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
>>>
>>> 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
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
; *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(
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
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