@Override public int getNodeInstancesSize() { return ((WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId)).getNodeInstances().size(); }
private Collection<Long> getSubFlows(ProcessInstance processInstance) { Collection<Long> result = new HashSet<Long>(); if (processInstance == null) { return result; } WorkflowProcessInstance wp = (WorkflowProcessInstance) processInstance; for (NodeInstance n : wp.getNodeInstances()) { if (n instanceof SubProcessNodeInstance) { SubProcessNodeInstance spn = (SubProcessNodeInstance) n; result.add(spn.getProcessInstanceId()); } } return result; }
private Collection<Long> getSubFlows(ProcessInstance processInstance) { Collection<Long> result = new HashSet<Long>(); if (processInstance == null) { return result; } WorkflowProcessInstance wp = (WorkflowProcessInstance) processInstance; for (NodeInstance n : wp.getNodeInstances()) { if (n instanceof SubProcessNodeInstance) { SubProcessNodeInstance spn = (SubProcessNodeInstance) n; result.add(spn.getProcessInstanceId()); } } return result; }
public int getNodeInstancesSize() { StatefulKnowledgeSession ksession = this.getKnowledgeSession(); try{ return ((WorkflowProcessInstance) ksession.getProcessInstance(this.processInstanceId)).getNodeInstances().size(); } finally{ ksession.dispose(); } }
@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(); } }