ResourceChangeScannerConfiguration sconf = ResourceFactory.getResourceChangeScannerService().newResourceChangeScannerConfiguration();
sconf.setProperty( "drools.resource.scanner.interval",
"2" );
ResourceFactory.getResourceChangeScannerService().configure( sconf );
KnowledgeAgentConfiguration aconf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
aconf.setProperty( "drools.agent.scanDirectories",
"true" );
aconf.setProperty( "drools.agent.scanResources",
"true" );
aconf.setProperty( "drools.agent.newInstance",
"true" );
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "test agent",
kbase,
aconf );