[rules-users] Rule using accumulate

Andres Corvetto acorvetto at gmail.com
Mon Apr 26 15:43:39 EDT 2010


Thank you for your reply!
I understand your approach, and I think it could work if Offers were
inserted into the working memory after the Bid.
However, to implement your approach for already inserted Offers I think I
would need some way of forcing the matching Offer to be the oldest in
memory, is that possible?
The rule would be something like:

rule "Match Offer"
	when
		$b : PartiallyCoveredBid(uncoveredSize>0, $p:price)
		$o : Offer(price<$p. alreadyUsed==false, [this is the oldest Offer in
memory with these conditions])		
	then
	    [ add Offer $o to Bid $b]
end

Thanks again
       Andrés
-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Rule-using-accumulate-tp757311p757703.html
Sent from the Drools - User mailing list archive at Nabble.com.




More information about the rules-users mailing list