Ok, approx data set:
Primary Account | Secondary Account | Operation | Amount | Type | Owner
------------------------------------------------------------------------
0001 | | debit | 100 | A | M
1001 | | credit | 80 | A | F
1001 | | credit | 20 | X | F
0002 | 2002 | debit | 50 | B | M
2002 | | dedit | 20 | B | M
1002 | | credit | 70 | C | M
Rules:
1) for all primary accounts 'zxxy' where y < 5, there should be a matching
primary account '(z+1)xxy'
- [this one is true for the dataset above]
2) sumOfDebit(primary + matching_primary + secondary_account) -
sumOfCredit(primary + matching_primary + secondary_account) must be = 0
- [this one is also true]
3) OwnerOf (primary_account, matching_primary, secondary_account) must be of
the same gender
- [this one is false - 0001 owner must be 'F']
.... The kind of the rules above... The dataset is more complex and the
rules are a bit more involved, but this should give an idea.
Thanks for all suggestions!
Vlad
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Michael Rhoden
Sent: 01 February 2007 17:49
To: 'Rules Users List'
Subject: RE: [rules-users] advice is needed: rule based processing
ofinterconnected facts
Can you post a couple of example conditions with a dataset you want to
check?
-Michael
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Olenin, Vladimir
(MOH)
Sent: Thursday, February 01, 2007 4:04 PM
To: rules-users(a)lists.jboss.org
Subject: [rules-users] advice is needed: rule based processing
ofinterconnected facts
Hi,
I need some pointer as to where to start with the problem below.
The system should be able to validate the balancing data based on around 400
different rules. To simplify the task, the data facts are essentially the
debit/credit transactions on different accounts. The rules describe the
correlation between different facts:
- eg, all debit transactions minus all credit transaction must be
equal 0
- if one account got credited, there should be another account
(within the same dataset) which was debited
- if there are accounts starting with some letter combination,
there also should be
- etc
In other words, each rule describes
- the subset of facts to be analyzed
- the rules to be checked against this subset
It seems basically like each fact is a set of Account Number, Transaction
Type, Transaction Amount information, Secondary Account Number (which
sometimes needs to be validated against some other account number within the
same data set). But I couldn't find a way to relate between multiple data
facts.
On one hand rule engine seems to be a good solution in here, but I'm not
sure how to deal with 'dynamic selection' of the subset of facts. Can this
kind of task be reformulated somehow?
Any pointers into the DROOLS documentation or hints on a general approach
would be greatly appreciated!
Thanks.
Vlad
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users