Search in sources :

Example 1 with TriggerNodeCommand

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

the class ProcessInstanceAdminServiceImpl method triggerNode.

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

Aggregations

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