The internal implementation makes use of the JBoss Rules rules engine to process the application. When processApplication is called, a RuleBase is instantiated and the DRL rules definition file located at /InsuranceRulesEngine.drl or in the location set in ruleFileLocation is parsed. Then a WorkingMemory is instantiated, the Person array; the Bike array and the Address are asserted into the WorkingMemory and the rules run against these objects.
This implementation also asserts a QuoteWorkingObject into the working memory and expects the rules defined in the DRL file to work with this object so that once WorkingMemory.fireAllRules has returned, the QuoteWorkingObject.getQuote method returns the results of the application as a Quote object, which is returned.
@author Pete Bennett @version $Revision: 1.1 $ @see com.pajb.ire.domain.Person @see com.pajb.ire.domain.Bike @see com.pajb.ire.domain.Address @see com.pajb.ire.domain.Quote @see com.pajb.ire.engine.QuoteWorkingObject @see org.drools.RuleBase; @see org.drools.WorkingMemory;
| |