Search in sources :

Example 1 with RelativeUpdateTimerCommand

use of org.jbpm.process.instance.command.RelativeUpdateTimerCommand in project jbpm by kiegroup.

the class ProcessInstanceAdminServiceImpl method updateTimerRelative.

@Override
public void updateTimerRelative(long processInstanceId, long timerId, long delay, long period, int repeatLimit) throws NodeInstanceNotFoundException, ProcessInstanceNotFoundException {
    ProcessInstanceDesc pi = runtimeDataService.getProcessInstanceById(processInstanceId);
    if (pi == null) {
        throw new ProcessInstanceNotFoundException("Process instance with id " + processInstanceId + " not found");
    }
    processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(processInstanceId), new RelativeUpdateTimerCommand(processInstanceId, timerId, delay, period, repeatLimit));
}
Also used : ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) ProcessInstanceNotFoundException(org.jbpm.services.api.ProcessInstanceNotFoundException) RelativeUpdateTimerCommand(org.jbpm.process.instance.command.RelativeUpdateTimerCommand)

Aggregations

RelativeUpdateTimerCommand (org.jbpm.process.instance.command.RelativeUpdateTimerCommand)1 ProcessInstanceNotFoundException (org.jbpm.services.api.ProcessInstanceNotFoundException)1 ProcessInstanceDesc (org.jbpm.services.api.model.ProcessInstanceDesc)1