// Calls the Resource Scanner and sets up a listener and a latch so we can wait until it's finished processing, instead of using timers
final CountDownLatch latch = new CountDownLatch( 1 );
final List<ResourceCompilationFailedEvent> resourceCompilationFailedEvents = new ArrayList<ResourceCompilationFailedEvent>();
KnowledgeAgentEventListener l = new KnowledgeAgentEventListener() {
public void resourceCompilationFailed(ResourceCompilationFailedEvent event) {
//It is not correct to throw an exception from a listener becuase
//it will interfere with the agent's logic.
//throw new RuntimeException("Unable to compile Knowledge"+ event );