@Override public String getCurrentNodeName() { WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId); long nodeId = process.getNodeInstances().iterator().next().getNodeId(); return ((WorkflowProcess) this.kbase.getProcess(this.processId)).getNode(nodeId).getName(); }
public String getCurrentNodeName() { StatefulKnowledgeSession ksession = this.getKnowledgeSession(); try{ WorkflowProcessInstance process = (WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId); long nodeId = process.getNodeInstances().iterator().next().getNodeId(); return ((WorkflowProcess) this.kbase.getProcess(this.processId)).getNode(nodeId).getName(); } finally{ ksession.dispose(); } }
public static Collection<NodeInstance> getActiveNodeInstances(long processInstanceId) { ProcessInstance processInstance = getSession().getProcessInstance(processInstanceId); if (processInstance != null){ ((ProcessInstanceImpl)processInstance).setProcess(getSession().getKnowledgeBase().getProcess(processInstance.getProcessId())); Collection<NodeInstance> activeNodes = ((WorkflowProcessInstance)processInstance).getNodeInstances(); activeNodes.addAll(collectActiveNodeInstances(activeNodes)); return activeNodes; } return null; }
Process process = kbase.getProcess(processId); if (process == null) {