private KnowledgeBase createKnowledgeBase(String flowFile) {
KnowledgeBuilderConfiguration conf = KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
conf.setProperty("drools.dialect.java.compiler", "JANINO");
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(conf);
kbuilder.add( new ClassPathResource( flowFile ), ResourceType.DRF );
if(kbuilder.hasErrors()){
StringBuilder errorMessage = new StringBuilder();
for (KnowledgeBuilderError error: kbuilder.getErrors()) {
errorMessage.append( error.getMessage() );
errorMessage.append( System.getProperty( "line.separator" ) );