If the age of Offers is so important it ought to be represented as fact data. If it cannot be added to the Offer itself, a proxy fact could be created, combining a counter with an Offer reference. A high salience rule for an Offer without OfferProxy would create this.
-W On Mon, Apr 26, 2010 at 9:43 PM, Andres Corvetto <[email protected]> wrote: > > 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. > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
