[rules-users] Getting Latest Matching Fact

Wolfgang Laun wolfgang.laun at gmail.com
Sun Aug 26 12:27:40 EDT 2012


You are changing the requirements, from the first element with "car" to
something
else now, aren't you?

Just write a Java method that computes the index of a list of values
(XX-nn) that fulfils
your requirements, and then we'll continue the discussion of how to use it
in
rules.

-W



On 26 August 2012 17:03, salt <writemesaltworth at gmail.com> wrote:

> Thanks Laune.
>
> I thought using that salience would be helpful for below scenario but it
> seems not possible.
>
> An list contains values like
>
> Example with dummy values
>
> AA - 1
> A  - 2
> B  - 3
> A  - 4
>
> Need to retrieve the latest success one (Failed ones - if the list contains
> AA before A then that is failed)..
> For the above one the result should be B and 3
>
> Few scenarios
>
> AA - 1
> A   - 2
> A   - 3
> A   - 4
> B   - 5
>
> Result should be A - 3
>
> AA - 1
> A  - 2
> AA - 3
> B  - 4
> A  - 5
>
> Result should be B - 4
>
> Kindly share your thoughts on this (salience or without salience)..
>
> Thanks
> Salt
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Getting-Latest-Matching-Fact-tp4019345p4019393.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120826/5a2ef1e3/attachment.html 


More information about the rules-users mailing list