[rules-users] BUG: Can't build a rete network with an inner OR group element

Wolfgang Laun wolfgang.laun at gmail.com
Thu Nov 28 08:33:07 EST 2013


If possible, pick the first element of FamilyData.data only, like so:
   y: YearData( ) from $o.data.get(0)

-W

On 28/11/2013, braveheart85 <andrea.pacifico.85 at gmail.com> wrote:
> unfortunately there is a problem in previous solution.
> I wrote:
>
> 	$o: FamilyData( identifierCode == "PCFNDR85E15H501S" )
> 	$y: YearData( ) from $o.data
> 	$result : Number( ) from accumulate
> 		(FamilyEntity( $relatives : relative ) from $y.familyEntity,
> 			init( int count = 0; ),
> 			action( count += $relatives.size(); ),
> 			reverse( count -= $relatives.size(); ),
> 			result( count )
> 		)
>
> but if there are two YearData I obtain two results that are the count for
> each year. I would only one count that is count of all years.
>
> Which may be the best way to get it?
>
> Best Regards
> Andrea
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/BUG-Can-t-build-a-rete-network-with-an-inner-OR-group-element-tp4026974p4026979.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
>


More information about the rules-users mailing list