str += "when \n";
str += "then \n";
str += " System.out.println( \"hello2!!!\" ); \n";
str += "end \n" ;
KnowledgeBuilderProvider kbuilderFactory = this.client.getKnowledgeBuilderFactory();
KnowledgeBuilder kbuilder = kbuilderFactory.newKnowledgeBuilder();
kbuilder.add( ResourceFactory.newByteArrayResource( str.getBytes() ), ResourceType.DRL );
if ( kbuilder.hasErrors() ) {
System.out.println( "Errors: " + kbuilder.getErrors() );
}