[rules-users] Accum question

Mike D mike.dalaker at kewill.com
Fri Jul 27 09:31:32 EDT 2007


Newbie question again... 

I'm trying to get a count of V lines if I have an X.  If more than 1 V line,
I pass...  Obviously I can't have $totV on LHS, but you get my drift.  What
is the correct syntax for this one?  I've been digging in the docs on accum,
but can't find anything that fits what I'm trying to do.

Thanks,
Mike

rule "00910 Pass XV sets"
	when
		$status : ValidationPassFailStatus()
		exists ValidationControl(validationNo == 910)
		$totV  : number()
		from accumulate(CiLines($ciNo : ciNo, $ciLineNo : ciLineNo, spiSecondary
== "V"), sum($totV))
                CiLines(ciNo == $ciNo, ciLineNo == $ciLineNo, spiSecondary
== "X", $totV > 1)
	then
		$status.pass(910);
end


-- 
View this message in context: http://www.nabble.com/Accum-question-tf4157809.html#a11829193
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list