You'll need an attribute that determines the order. If your facts are events, there's the timestamp. Otherwise, add a counter.
$latest: F( $c: counter ) not F( counter > $c ) -W On 05/06/2013, suntrian <[email protected]> wrote: > i inserted several facts of one type into the workmemory , but i need just > the latest one, how should i write the rule to match the latest fact > > > > -- > View this message in context: > http://drools.46999.n3.nabble.com/how-to-write-the-rule-to-match-the-latest-facts-tp4024131.html > Sent from the Drools: User forum 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
