Title: Message Title
|
|
|
|
|
|
During Mifos implementations, the financial institution may want to implement custom functionality. Example: At the time of approval of a loan, the loan amount should not exceed 5 times the sum of balances available in all the savings accounts of the customer.
Ideally this should be done using a configurable rules engine. However, if a facility is available where a technical specialist can add some Java code and hook this code to an event when the code will be executed, it will help 'extend' Mifos functionality for a specific implementation without having to modify existing Mifos Java classes. If specialists modify existing Mifos classes, then upgrading Mifos without losing these changes could be a challenge.
There could be a configuration within Mifos as follows: ApplicableFor: Loans Event: PreLoanApproval Inputs: LoanAccountData, ClientData (these have to be existing Java classes from Mifos X code - objects of these) ClassToInvoke: com.specialist.mifosx.extensions.LoanRules MethodToInvoke: doPreApprovalChecksForLoans
If configured, then Mifos will invoke the method from the class specified when the event happens.
Meanings: ApplicableFor - whether it is applicable for Clients, Loans, Savings etc. Events - will be one of a predefined list. The predefined list could be as follows: - preClientCreate / preClientUpdate / preClientClose - preClientApprove / preClientReject - postClientCreate / postClientUpdate / postClientClose - postClientApprove / postClientReject - preLoanCreate / preLoanUpdate / preClientDelete - preLoanApprove / preLoanReject - postLoanCreate / postLoanUpdate / postClientDelete - postLoanApprove / postLoanReject - Etc. ClassToInvoke: The Java class which has the custom code to be invoked MethodToInvoke: The Java method within the above class which has the custom code to be invoked
For the example mentioned above: The doPreApprovalChecksForLoans method in com.specialist.mifosx.extensions.LoanRules class would take two input parameters of type LoanAccountData and ClientData. The method would internally have the logic for: fetching all savings balances for the customer and checking that the loan amount does not exceed 5 times the sum of these balances.
I think this will be the first step to integrating a rules engine eventually to various 'events' in Mifos X.
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Mifos-issues mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mifos-issues