You can collect objects of both classes with matching id and date.
Each of these collected objects has the original id and date a list of
amount figures.

Pairing the collected object from repository and accounting is simple.
Then, you'll have to implement an algorith that selects the items from
both sides in an acceptable way. I presume that one or more items from
one side must exactly be equal to one or more items from the other
side, which may not always be possible even though there would be
"coverage" of an item of one side by items on the other side (e.g.
7,11 vs.3,3,3,3).

But assuming that you detect matching sums, you retract the original
facts. In any case, the collected objects must be retracted, too, at
the end of the processing.

(Some details depend on the way the original facts are inserted.)

HTH
-W






On 14/12/2011, Zhuo LI <milanello1...@gmail.com> wrote:
> i want to find txns from both sides whose portfolio asset and sum of amt
> are the same.
>
> 在 2011-12-14 上午9:18,"Salaboy" <sala...@gmail.com>写道:
>
>> Do you want to compare to set of transactions to find which of them are in
>> both sets and which of them are not?
>> Is that what are you trying to achieve?
>> Cheers
>>
>> - CTO @ http://www.plugtree.com
>> - MyJourney @ http://salaboy.wordpress.com
>> - Co-Founder @ http://www.jbug.com.ar
>> - Mauricio "Salaboy" Salatino -
>>
>> On 13/12/2011, at 10:27, Wolfgang Laun <wolfgang.l...@gmail.com> wrote:
>>
>> > Huh?
>> > -W
>> >
>> > 2011/12/13 Zhuo Li <milanello1...@gmail.com>:
>> >> Folks,
>> >>
>> >>
>> >>
>> >> I am recently working on a BI project which is doing reconciliation
>> between
>> >> repository and accounting. I'm using Drools 5.1.1 to maintain all these
>> >> matching rules. One scenario I have no clue to implement in Drools is
>> that I
>> >> need to find x transactions from repository, to match y transactions
>> from
>> >> accounting, while existing repository transactions and accounting
>> >> transactions are bigger than x and y. Does anybody have experience to
>> >> do
>> >> similar thing in Drools?
>> >>
>> >>
>> >>
>> >> Best Abe
>> >>
>> >>
>> >> _______________________________________________
>> >> rules-users mailing list
>> >> rules-users@lists.jboss.org
>> >> https://lists.jboss.org/mailman/listinfo/rules-users
>> >>
>> > _______________________________________________
>> > rules-users mailing list
>> > rules-users@lists.jboss.org
>> > https://lists.jboss.org/mailman/listinfo/rules-users
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to