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

    JBOSS Rules

    srinivasanj

      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

          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;
          }

          Regards,
          Alex