final ReteooWorkingMemoryInterface session = ((StatefulKnowledgeSessionImpl)ksession).session;
new Thread(new Runnable() {
public void run() {
if ( agendaFilter != null ) {
session.fireUntilHalt( new StatefulKnowledgeSessionImpl.AgendaFilterWrapper( agendaFilter ) );
} else {
session.fireUntilHalt();
}
}
}).start();