Search in sources :

Example 1 with ListNodesCommand

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

the class ProcessInstanceAdminServiceImpl method getProcessNodes.

@Override
public Collection<ProcessNode> getProcessNodes(long processInstanceId) throws ProcessInstanceNotFoundException {
    ProcessInstanceDesc pi = runtimeDataService.getProcessInstanceById(processInstanceId);
    if (pi == null) {
        throw new ProcessInstanceNotFoundException("Process instance with id " + processInstanceId + " not found");
    }
    Collection<ProcessNode> nodes = processService.execute(pi.getDeploymentId(), ProcessInstanceIdContext.get(processInstanceId), new ListNodesCommand(processInstanceId));
    return nodes;
}
Also used : ListNodesCommand(org.jbpm.kie.services.impl.admin.commands.ListNodesCommand) ProcessNode(org.jbpm.services.api.admin.ProcessNode) ProcessInstanceDesc(org.jbpm.services.api.model.ProcessInstanceDesc) ProcessInstanceNotFoundException(org.jbpm.services.api.ProcessInstanceNotFoundException)

Aggregations

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