Re: [rules-users] Filtering eligible records for authorization - Is a rules engine right solution ?
I found this link useful http://docs.codehaus.org/display/DROOLS/Large+Datasets+and+performance Similar discussion http://stackoverflow.com/questions/2274993/should-i-use-drools-in-this-situation But i am looking for a suggestion from drools community. -- View this message in context: http://drools.46999.n3.nabble.com/Filtering-eligible-records-for-authorization-Is-a-rules-engine-right-solution-tp3165981p3171282.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to eval with property inside a nested object
Your suggestion worked for me thanks a lot. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-eval-with-property-inside-a-nested-object-tp3163169p3168446.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] how to eval with property inside a nested object
I found a solution. I have added all the BaseProducts in the uProduct as a Facts :) -- View this message in context: http://drools.46999.n3.nabble.com/how-to-eval-with-property-inside-a-nested-object-tp3163169p3165391.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Filtering eligible records for authorization - Is a rules engine right solution ?
I have an authorization screen for say payments A list of transactions is displayed. This is a filtered list. Each transaction listed in this screen needs to satisfy following conditions A) Meets Authorization Verification Matrix (AVM) conditions B) .. few more conditions not imp at this time In simplest form AVM is defined as below Below 5000 -- ApproverRole Above 5000 -- SeniorApproverRole Hence if the loggedIn user belongs to ApproverRole , all the transactions which are below 5000 should be displayed. I am trying to solve this problem using drools. Proposed solution. Create a rule AVMRULE Each payment is modeled as a FACT. Payment has two interesting properties 1) amount 2) isEligible When payment object is asserted into working memory the AVMRULE modifies the payment.isEligible. The user interface displays or hides the transaction based on payment.isEligible *Problem :* Average number of payments in a system can go up to a million. The above solution implies that the application has to fetch all the million records to the business layer. It can be optimized to fetch batch of records and stop reading as soon as we find first 10 records which have isEligible true. This works if the user wants to see first page. Doesn't work if he wants to see the last page. I am not sure if overall performance will improve in a multi-user environment at-least 20 concurrent users *Question :* Please note the problem is to display the filtered list. Also consider that there are more conditions to handle and AVM is much complex than what is defined above. Is rules engine appropriate to solve this problem ? -- View this message in context: http://drools.46999.n3.nabble.com/Filtering-eligible-records-for-authorization-Is-a-rules-engine-right-solution-tp3165981p3165981.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] how to eval with property inside a nested object
Hi everyone. I have a BaseProduct with paymentMode as a property BaseProduct is assigned to a Customer Customer creates a uProduct. uProduct is a customized product created by the customer. It contains multiple BaseProducts. for eg Music is a Baseproduct with Wire paymentMode Picture is a product with CreditCard paymentMode Movie is a product with DebitCard paymentMode iPod is a uProduct which contains Music and Pictures implies that it supports Wire and CreditCard iPad is a uProduct with contains Music, Movies and Pictures implies that it supports all paymentModes rule Non Mandatory // calculates all non mandatory fields for display when $transaction : Transaction($paymentModes :uProduct.baseProduct) // select all the paymentModes supported by the uProduct $displayMode : Property(payMode in $paymentModes) // select a property which has a valid paymentMode ... someOther conditions then ... in the above rule $paymentModes returns arrayList of baseProducts. But I want to access the list of paymentModes. ie, when Transaction has iPod $paymentMode should return [wire,CreditCard], when Transaction has iPad it should return [wire,CreditCard,DebitCard] Question : How do I access array of a selected property which are again part of Array of an object ? Any suggestion ? Thanks a lot. -- View this message in context: http://drools.46999.n3.nabble.com/how-to-eval-with-property-inside-a-nested-object-tp3163169p3163169.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users