1 Reply Latest reply on May 24, 2007 6:41 AM by Alex Ivansky

    JBOSS Rules

    Srinivasan J Newbie

      hai i need a sample program in JBoss Rule using Decision tables with Excel Sheet please send me the URL

        • 1. Re: JBOSS Rules
          Alex Ivansky Newbie

          This code may help you

          private static RuleBase readDecisionTable() throws Exception {
          final SpreadsheetCompiler converter = new SpreadsheetCompiler();
          final String drl = converter.compile( "/Sample.xls", InputType.XLS );

          PackageBuilder builder = new PackageBuilder();
          builder.addPackageFromDrl( new StringReader( drl ) );
          Package pkg = builder.getPackage();
          RuleBase ruleBase = RuleBaseFactory.newRuleBase();
          ruleBase.addPackage( pkg );
          return ruleBase;