PseudoClockScheduler clock = (PseudoClockScheduler) ksession.<SessionClock> getSessionClock();
Runnable fireUntilHaltRunnable = new Runnable() {
public void run() {
ksession.fireUntilHalt();
}
};
Thread fireUntilHaltThread = new Thread(fireUntilHaltRunnable, "Engine's thread");
fireUntilHaltThread.start();