Search in sources :

Example 1 with RetriggerNodeInstanceCommand

use of org.jbpm.kie.services.impl.admin.commands.RetriggerNodeInstanceCommand in project jbpm by kiegroup.

the class ProcessInstanceAdminServiceImpl method retriggerNodeInstance.

@Override
public void retriggerNodeInstance(long processInstanceId, long nodeInstanceId) 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 RetriggerNodeInstanceCommand(processInstanceId, nodeInstanceId));
}
Also used : RetriggerNodeInstanceCommand(org.jbpm.kie.services.impl.admin.commands.RetriggerNodeInstanceCommand) ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) ProcessInstanceNotFoundException(org.jbpm.services.api.ProcessInstanceNotFoundException)

Aggregations

RetriggerNodeInstanceCommand (org.jbpm.kie.services.impl.admin.commands.RetriggerNodeInstanceCommand)1 ProcessInstanceNotFoundException (org.jbpm.services.api.ProcessInstanceNotFoundException)1 ProcessInstanceDesc (org.jbpm.services.api.model.ProcessInstanceDesc)1