Package org.drools.decisiontable

Examples of org.drools.decisiontable.ExternalSpreadsheetCompiler.compile()


        final ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler();

        //the data we are interested in starts at row 2, column 2 (e.g. B2)
        String drl = null;
        try {
            drl = converter.compile(getSpreadsheetStream(), getRulesStream(), 2, 2);
        } catch (IOException e) {
            throw new IllegalArgumentException("Could not read spreadsheet or rules stream." ,e);
        }

        //compile the drl
View Full Code Here


        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);
        }
View Full Code Here

        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
View Full Code Here

       
        //first we compile the spreadsheet with the template
        //to create a whole lot of rules.
        final ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler();
        //the data we are interested in starts at row 2, column 2 (e.g. B2)
        final String drl = converter.compile(getSpreadsheetStream(), getRulesStream(), 2, 2);

        //Uncomment to see rules
        //System.out.println( drl );
        //BUILD RULEBASE
        final RuleBase rb = buildRuleBase(drl);
View Full Code Here

        final List<DataListener> listeners = new ArrayList<DataListener>();
        TemplateDataListener l1 = new TemplateDataListener(10, 3, getBasePricingRulesStream());
        listeners.add(l1);
        TemplateDataListener l2 = new TemplateDataListener(30, 3, getPromotionalPricingRulesStream());
        listeners.add(l2);
        converter.compile(getSpreadsheetStream(), InputType.XLS, listeners);

        String baseRules = l1.renderDRL();
        //Uncomment to see the base pricing rules
        //System.out.println(baseRules);
        String promotionalRules = l2.renderDRL();
View Full Code Here

        final ExternalSpreadsheetCompiler converter = new ExternalSpreadsheetCompiler();

        //the data we are interested in starts at row 2, column 2 (e.g. B2)
        String drl = null;
        try {
            drl = converter.compile(getSpreadsheetStream(), getRulesStream(), 2, 2);
        } catch (IOException e) {
            throw new IllegalArgumentException("Could not read spreadsheet or rules stream." ,e);
        }

        //compile the drl
View Full Code Here

        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);
        }
View Full Code Here

        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
View Full Code Here

        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);
        }
View Full Code Here

        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
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.