Package net.firstpartners.drools

Examples of net.firstpartners.drools.SpreadSheetRuleRunner


   */
  public HSSFWorkbook runExcelDataExample() throws IOException, DroolsParserException, ClassNotFoundException{

    //Handle to the Spreadsheet Rule Runner and Rule file loader
    IRuleLoader ruleLoader = new FileRuleLoader();
    SpreadSheetRuleRunner ruleRunner = new SpreadSheetRuleRunner(ruleLoader);

    //Start Integrate in new RuleRunner
    //Identify where the rules are stored
    RuleSource ruleSource = new RuleSource();
    ruleSource.setRulesLocation(RULES_FILES);


    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = ruleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);

View Full Code Here


  public  HSSFWorkbook runExcelDataRulesExample() throws IOException, DroolsParserException, ClassNotFoundException{

    //Handle to the Spreadsheet Rule Runner and Rule file loader
    IRuleLoader ruleLoader = new FileRuleLoader();
    SpreadSheetRuleRunner ruleRunner = new SpreadSheetRuleRunner(ruleLoader);

    //Start Integrate in new RuleRunner
    //Identify where the rules are stored
    RuleSource ruleSource = new RuleSource();
    ruleSource.setRulesLocation(RULES_FILES);


    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = ruleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);
View Full Code Here

  public HSSFWorkbook runRuleflowExample() throws IOException, DroolsParserException, ClassNotFoundException{


    //Handle to the Spreadsheet Rule Runner and Rule file loader
    IRuleLoader ruleLoader = new FileRuleLoader();
    SpreadSheetRuleRunner sheetRuleRunner = new SpreadSheetRuleRunner(ruleLoader);

    //Start Integrate in new RuleRunner
    //Identify where the rules are stored
    RuleSource ruleSource = new RuleSource();
    ruleSource.setRuleFlowFileUrl(RULEFLOW_FILE);
    ruleSource.setRulesLocation(RULES_FILES);

    //Get the URL
    File excelDataFile = new File(EXCEL_DATA_FILE);

    //Call the rule engine passing in the excel data file, the rules we want to use, and name of the spreadsheet that we log rules to
    HSSFWorkbook wb = sheetRuleRunner.callRules(excelDataFile,ruleSource, EXCEL_LOG_WORKSHEET_NAME);


    //Output the workbook as a file,
    SpreadSheetOutputter.outputToFile(wb, EXCEL_LOG_WORKSHEET_NAME);
View Full Code Here

TOP

Related Classes of net.firstpartners.drools.SpreadSheetRuleRunner

Copyright © 2018 www.massapicom. 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.