SimulationDebugger simDebugger = null;
try {
// init simulation run
Clock clock = new ThreadLocalClock(new DefaultClockFactory());
FactoryBean<ProcessEngineImpl> simulationProcessEngineFactory = new SimulationProcessEngineFactory(
ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault()
);
final SimpleSimulationRun.Builder builder = new SimpleSimulationRun.Builder();
builder.processEngine(simulationProcessEngineFactory.getObject())
.eventCalendar((new SimpleEventCalendarFactory(clock, new SimulationEventComparator(), listener.getSimulationEvents())).getObject())
.eventHandlers(getHandlers());
simDebugger = builder.build();
simDebugger.init(new NoExecutionVariableScope());