private InternalProcessRuntime createProcessRuntime() { try { return ProcessRuntimeFactory.newProcessRuntime( this ); } catch ( IllegalArgumentException e ) { return null; } }
public static synchronized ProcessRuntimeFactoryService getProcessRuntimeFactoryService() { if (provider == null) { loadProvider(); } return provider; }
public static InternalProcessRuntime newProcessRuntime(AbstractWorkingMemory workingMemory) { return getProcessRuntimeFactoryService().newProcessRuntime(workingMemory); }
public String toString() { return "==>[ProcessNodeTriggered(nodeId=" + nodeInstance.getNodeId() + "; id=" + nodeInstance.getId() + "; processName=" + getProcessInstance().getProcessName() + "; processId=" + getProcessInstance().getProcessId() + ")]"; } }
/** * Completes the Work Item this handler makes reference to. * @param results */ public void completeWorkItem(Map<String, Object> results){ this.manager.completeWorkItem(workItemId, results); }
public Object getParameter(String name) { return delegate.getParameter(name); }
public Object getVariable(String variableName) { if (nodeInstance != null) { return nodeInstance.getVariable(variableName); } else { return ((WorkflowProcessInstance) getProcessInstance()).getVariable(variableName); } }
public void abortWorkItem(long id) { delegate.abortWorkItem(id); }
public long getProcessInstanceId() { return delegate.getProcessInstanceId(); }
public void setVariable(String variableName, Object value) { if (nodeInstance != null) { nodeInstance.setVariable(variableName, value); } else { ((WorkflowProcessInstance) getProcessInstance()).setVariable(variableName, value); } }
public Map<String, Object> getResults() { return delegate.getResults(); }
private String createNodeInstanceId(NodeInstance nodeInstance) { String nodeInstanceId = "" + nodeInstance.getId(); NodeInstanceContainer nodeContainer = nodeInstance.getNodeInstanceContainer(); while (nodeContainer != null) { if (nodeContainer instanceof NodeInstance) { nodeInstance = (NodeInstance) nodeContainer; nodeInstanceId = nodeInstance.getId() + ":" + nodeInstanceId; nodeContainer = nodeInstance.getNodeInstanceContainer(); } else { break; } } return nodeInstanceId; }
public ProcessNodeTriggeredEventImpl(final NodeInstance nodeInstance, KnowledgeRuntime kruntime) { super( nodeInstance.getProcessInstance(), kruntime ); this.nodeInstance = nodeInstance; }
public ProcessInstance startProcessInstance(long processInstanceId) { return processRuntime.startProcessInstance(processInstanceId); }
public ProcessInstance createProcessInstance(String processId, Map<String, Object> parameters) { return processRuntime.createProcessInstance(processId, parameters); }
public int getState() { return delegate.getState(); }
public Object getResult(String name) { return delegate.getResult(name); }
public String toString() { return "==>[ProcessNodeLeft(nodeId=" + nodeInstance.getNodeId() + "; id=" + nodeInstance.getId() + "; processName=" + getProcessInstance().getProcessName() + "; processId=" + getProcessInstance().getProcessId() + ")]"; } }
public ProcessInstance getProcessInstance() { if (processInstance != null) { return processInstance; } if (nodeInstance != null) { return (ProcessInstance) nodeInstance.getProcessInstance(); } return null; }
public ProcessNodeLeftEventImpl(final NodeInstance nodeInstance, KnowledgeRuntime kruntime) { super( nodeInstance.getProcessInstance(), kruntime ); this.nodeInstance = nodeInstance; }