ProcessInstanceAdminServiceImpl implements ProcessInstanceAdminService { @Override public Collection<TimerInstance> getTimerInstances(long processInstanceId) throws ProcessInstanceNotFoundException { ProcessInstanceDesc pi = runtimeDataService.getProcessInstanceById(processInstanceId); if (pi == null) { throw new ProcessInstanceNotFoundException("Process instance with id " + processInstanceId + " not found"); } Collection<TimerInstance> timers = processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(processInstanceId), new ListTimersCommand(processInstanceId)); return timers; } ProcessInstanceAdminServiceImpl(); void setProcessService(ProcessService processService); void setRuntimeDataService(RuntimeDataService runtimeDataService); void setIdentityProvider(IdentityProvider identityProvider); void setCommandService(TransactionalCommandService commandService); @Override Collection<ProcessNode> getProcessNodes(long processInstanceId); @Override void cancelNodeInstance(long processInstanceId, long nodeInstanceId); @Override void retriggerNodeInstance(long processInstanceId, long nodeInstanceId); @Override void updateTimer(long processInstanceId, long timerId, long delay, long period, int repeatLimit); @Override void updateTimerRelative(long processInstanceId, long timerId, long delay, long period, int repeatLimit); @Override Collection<TimerInstance> getTimerInstances(long processInstanceId); @Override void triggerNode(long processInstanceId, long nodeId); @Override Collection<NodeInstanceDesc> getActiveNodeInstances(long processInstanceId); @Override void acknowledgeError(String... errorId); @Override ExecutionError getError(String errorId); @Override List<ExecutionError> getErrors(boolean includeAcknowledged, QueryContext queryContext); @Override List<ExecutionError> getErrorsByProcessId(String deploymentId, String processId, boolean includeAcknowledged, QueryContext queryContext); @Override List<ExecutionError> getErrorsByProcessInstanceId(long processInstanceId, boolean includeAcknowledged, QueryContext queryContext); @Override List<ExecutionError> getErrorsByProcessInstanceId(long processInstanceId, String nodeName, boolean includeAcknowledged, QueryContext queryContext); @Override List<ExecutionError> getErrorsByDeploymentId(String containerId, boolean includeAcknowledged, QueryContext queryContext);  }
@Test(timeout = 10000) public void testTimerName() throws Exception { processInstanceId = processService.startProcess(deploymentUnit.getIdentifier(), "org.jbpm.boundarytimer"); assertNotNull(processInstanceId); Collection<TimerInstance> timers = processAdminService.getTimerInstances(processInstanceId); assertNotNull(timers); assertEquals(1, timers.size()); TimerInstance timer = timers.iterator().next(); assertEquals("usertask-timer", timer.getTimerName()); }