* @return
* @throws IOException
*/
private KnowledgeBase buildKBase() {
//first we compile the decision table into a whole lot of rules.
final ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler();
String basePricingDRL = null;
String promotionalPricingDRL = null;
try {
//the data we are interested in starts at row 10, column 3
basePricingDRL = converter.compile(getSpreadsheetStream(), getBasePricingRulesStream(), 10, 3);
//the data we are interested in starts at row 30, column 3
promotionalPricingDRL = converter.compile(getSpreadsheetStream(), getPromotionalPricingRulesStream(), 30, 3);
} catch (IOException e) {
throw new IllegalArgumentException("Invalid spreadsheet stream.", e);
}
//compile the drls