RuleIntegrationException,
PackageIntegrationException,
InvalidPatternException {
//read in the source
final Reader reader = new InputStreamReader( Waltz.class.getResourceAsStream( "waltz.drl" ) );
final DrlParser parser = new DrlParser();
final PackageDescr packageDescr = parser.parse( reader );
if( parser.hasErrors() ) {
for( DroolsError error : parser.getErrors() ) {
System.out.println( error );
}
assertFalse( parser.getErrors().toString(), parser.hasErrors() );
}
//pre build the package
final PackageBuilder builder = new PackageBuilder();
builder.addPackage( packageDescr );