You are changing the requirements, from the first element with &quot;car&quot; to something<br>else now, aren&#39;t you?<br><br>Just write a Java method that computes the index of a list of values (XX-nn) that fulfils<br>your requirements, and then we&#39;ll continue the discussion of how to use it in<br>
rules.<br><br>-W<br><br><br><br><div class="gmail_quote">On 26 August 2012 17:03, salt <span dir="ltr">&lt;<a href="mailto:writemesaltworth@gmail.com" target="_blank">writemesaltworth@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Laune.<br>
<br>
I thought using that salience would be helpful for below scenario but it<br>
seems not possible.<br>
<br>
An list contains values like<br>
<br>
Example with dummy values<br>
<br>
AA - 1<br>
A  - 2<br>
B  - 3<br>
A  - 4<br>
<br>
Need to retrieve the latest success one (Failed ones - if the list contains<br>
AA before A then that is failed)..<br>
For the above one the result should be B and 3<br>
<br>
Few scenarios<br>
<br>
AA - 1<br>
A   - 2<br>
A   - 3<br>
A   - 4<br>
B   - 5<br>
<br>
Result should be A - 3<br>
<br>
AA - 1<br>
A  - 2<br>
AA - 3<br>
B  - 4<br>
A  - 5<br>
<br>
Result should be B - 4<br>
<br>
Kindly share your thoughts on this (salience or without salience)..<br>
<br>
Thanks<br>
Salt<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019393.html" target="_blank">http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019393.html</a><br>

Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>