use of org.jbpm.kie.services.impl.admin.commands.ListTimersCommand in project jbpm by kiegroup.
the class ProcessInstanceAdminServiceImpl method getTimerInstances.
@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;
}
Aggregations