[rules-users] counting Facts

Wolfgang Laun wolfgang.laun at gmail.com
Sat Jul 23 03:55:50 EDT 2011


On 23 July 2011 00:22, pamerida <elpamm at hotmail.com> wrote:

>
>
> with this rule Im able to get all the facts of the type segmentGroup8
>
> $cuscar : Cuscar(); $group7: SegmentGroup7() from $cuscar.segmentGroup7;
> $group8 : SegmentGroup8() from $group7.segmentGroup8;
>
> but I would like to count the number of facts, any idea how?? thanks so
> much
> for your help :)
>

$cuscar : Cuscar()
Number( $count: intValue ) from accumulate (
    SegmentGroup7( $group8: segmentGroup8  ) from $cuscar.segmentGroup7,
    sum( $sgroup8.size() ) )

-W


>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/counting-Facts-tp3192513p3192513.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110723/29853ced/attachment.html 


More information about the rules-users mailing list