kfs.write( ResourceFactory.newClassPathResource( pmmlSource ).setResourceType( ResourceType.PMML ) );
kfs.write( ResourceFactory.newByteArrayResource( extraDrl.getBytes() )
.setSourcePath( "rules.drl" )
.setResourceType( ResourceType.DRL ) );
Results res = ks.newKieBuilder( kfs ).buildAll().getResults();
if ( res.hasMessages( Message.Level.ERROR ) ) {
System.out.println( res.getMessages( Message.Level.ERROR ) );
}
assertEquals( 0, res.getMessages( Message.Level.ERROR ).size() );
KieSession kSession = ks.newKieContainer( ks.getRepository().getDefaultReleaseId() ).newKieSession();
kSession.insert( "trigger" );
kSession.fireAllRules();