@Test public void testRunToTime() throws Exception { recordEvents(); SimulationDebugger simDebugger = createDebugger(); simDebugger.init(new NoExecutionVariableScope()); RuntimeService runtimeService = SimulationRunContext.getRuntimeService(); TaskService taskService = SimulationRunContext.getTaskService(); HistoryService historyService = SimulationRunContext.getHistoryService(); simDebugger.runTo(0); ProcessInstance procInstance = runtimeService.createProcessInstanceQuery().active().processInstanceBusinessKey("oneTaskProcessBusinessKey").singleResult(); assertNull(procInstance); simDebugger.runTo(1); step0Check(SimulationRunContext.getRepositoryService()); simDebugger.runTo(1001); step1Check(runtimeService, taskService); simDebugger.runTo(2000); step1Check(runtimeService, taskService); simDebugger.runTo(2500); step2Check(runtimeService, taskService); checkStatus(historyService); simDebugger.close(); ProcessEngines.destroy(); }
@Override public void close() { SimulationRunContext.getEventCalendar().clear(); SimulationRunContext.removeEventCalendar(); SimulationRunContext.getProcessEngine().close(); SimulationRunContext.removeProcessEngine(); }
SimpleSimulationRun extends AbstractSimulationRun { @Override public void close() { SimulationRunContext.getEventCalendar().clear(); SimulationRunContext.removeEventCalendar(); SimulationRunContext.getProcessEngine().close(); SimulationRunContext.removeProcessEngine(); } }
SimpleSimulationRun extends AbstractSimulationRun { @Override public void close() { SimulationRunContext.getEventCalendar().clear(); SimulationRunContext.removeEventCalendar(); SimulationRunContext.getProcessEngine().close(); SimulationRunContext.removeProcessEngine(); } protected  SimpleSimulationRun(Builder builder); }
SimpleSimulationRun extends AbstractSimulationRun { @Override public void close() { SimulationRunContext.getEventCalendar().clear(); SimulationRunContext.removeEventCalendar(); SimulationRunContext.getProcessEngine().close(); SimulationRunContext.removeProcessEngine(); } protected  SimpleSimulationRun(Builder builder); @Override void close(); }
SimpleSimulationRun extends AbstractSimulationRun { @Override public void close() { SimulationRunContext.getEventCalendar().clear(); SimulationRunContext.removeEventCalendar(); SimulationRunContext.getProcessEngine().close(); SimulationRunContext.removeProcessEngine(); } protected  SimpleSimulationRun(Builder builder); @Override void close();  }