Examples of DecisionTableParseException


Examples of org.drools.decisiontable.parser.DecisionTableParseException

            return generatedDrl;

        }
        catch ( RuntimeException e )
        {
            throw new DecisionTableParseException( "An error occurred processing the decision table.",
                                                   e );
        }
    }
View Full Code Here

Examples of org.drools.decisiontable.parser.DecisionTableParseException

            factory.processEvents( req,
                                   din );
        }
        catch ( IOException ex )
        {
            throw new DecisionTableParseException( "Failed to open Excel stream, " +
                    "please check that the content is xls97 format.",
                                        ex );
        }
    }
View Full Code Here

Examples of org.drools.decisiontable.parser.DecisionTableParseException

        try {
          _listener.startSheet("csv");
          processRows(reader);
          _listener.finishSheet();
        } catch (IOException e) {
            throw new DecisionTableParseException("An error occurred reading the CSV data.", e);
        }
    }
View Full Code Here

Examples of org.drools.decisiontable.parser.DecisionTableParseException

    try {
      startSheet();
      processRows(reader);
      finishSheet();
    } catch (final IOException e) {
      throw new DecisionTableParseException(
          "An error occurred reading the CSV data.", e);
    }
  }
View Full Code Here

Examples of org.drools.decisiontable.parser.DecisionTableParseException

                                  (List) _listners.get( sheetName ) );

                }
            }
        } catch ( BiffException e ) {
            throw new DecisionTableParseException( "An error occured opening the workbook. ",
                                                   e );

        } catch ( IOException e ) {
            throw new DecisionTableParseException( "Failed to open Excel stream, " + "please check that the content is xls97 format.",
                                                   e );
        }

    }
View Full Code Here

Examples of org.drools.template.parser.DecisionTableParseException

        // list
        {
            actionTypeMap.put( new Integer( column ),
                               new ActionType( ActionType.DESCRIPTION ) );
        } else {
            throw new DecisionTableParseException( "Invalid column header (ACTION type), " + "should be CONDITION or ACTION (etc..) row number:" + (row + 1) + " cell number:" + (column + 1) + " - does not contain a leading C or A identifer." );
        }
    }
View Full Code Here

Examples of org.drools.template.parser.DecisionTableParseException

                                  _listeners.get( sheetName ) );

                }
            }
        } catch ( InvalidFormatException e ) {
            throw new DecisionTableParseException( "An error occurred opening the workbook. It is possible that the encoding of the document did not match the encoding of the reader.",
                                                   e );

        } catch ( IOException e ) {
            throw new DecisionTableParseException( "Failed to open Excel stream, " + "please check that the content is xls97 format.",
                                                   e );
        }

    }
View Full Code Here

Examples of org.drools.template.parser.DecisionTableParseException

            case Cell.CELL_TYPE_ERROR:
                cachedValue = String.valueOf( cell.getErrorCellValue() );
                break;

            default:
                throw new DecisionTableParseException( format( "Can't read cached value for cell[row=%d, col=%d, value=%s]!",
                                                               cell.getRowIndex(), cell.getColumnIndex(), cell ) );
        }
        return cachedValue;
    }
View Full Code Here

Examples of org.drools.template.parser.DecisionTableParseException

                              String value ) {
        this.hasValues = true;
        Integer key = new Integer( column );
        String content = (String) this.constraints.get( key );
        if ( content == null ) {
            throw new DecisionTableParseException( "No code snippet for CONDITION in cell " +
                                                           RuleSheetParserUtil.rc2name( this.headerRow + 2, this.headerCol ) );
        }
        SnippetBuilder snip = new SnippetBuilder( content );
        String result = snip.build( fixValue( value ) );
        this.values.add( result );
View Full Code Here

Examples of org.drools.template.parser.DecisionTableParseException

    /* (non-Javadoc)
     * @see org.drools.decisiontable.parser.RuleSheetListener#getRuleSet()
     */
    public Package getRuleSet() {
        if ( this._ruleList.isEmpty() ) {
            throw new DecisionTableParseException( "No RuleTable cells in spreadsheet." );
        }
        final Package ruleset = buildRuleSet();
        return ruleset;
    }
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.