/** * Gets a RuntimeEngine for an undefined {@link Context}. * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine() { return getRuntimeEngine((Context<?>)null); }
/** * Gets a RuntimeEngine for an undefined {@link Context}. * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine() { return getRuntimeEngine((Context<?>)null); }
private KnowledgeRuntimeEngine getRuntimeEngine() { return (KnowledgeRuntimeEngine)_runtimeManager.getRuntimeEngine(); }
private KnowledgeRuntimeEngine getRuntimeEngine() { return (KnowledgeRuntimeEngine)_runtimeManager.getRuntimeEngine(); }
private KnowledgeRuntimeEngine getPerRequestRuntimeEngine() { return (KnowledgeRuntimeEngine)_perRequestRuntimeManager.getRuntimeEngine(); }
private KnowledgeRuntimeEngine getRuntimeEngine() { return (KnowledgeRuntimeEngine)_runtimeManager.getRuntimeEngine(); }
private synchronized KnowledgeRuntimeEngine getSingletonRuntimeEngine() { if (_singletonRuntimeManager == null) { _singletonRuntimeManager = newSingletonRuntimeManager(); } return (KnowledgeRuntimeEngine)_singletonRuntimeManager.getRuntimeEngine(); }
/** * Gets a RuntimeEngine for a {@link Context} associated with the processInstanceId. * @param processInstanceId the processInstanceId * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine(Long processInstanceId) { return getRuntimeEngine(ProcessInstanceIdContext.get(processInstanceId)); }
/** * Gets a RuntimeEngine for a {@link Context} associated with the correlationKey. * @param correlationKey the correlationKey * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine(CorrelationKey correlationKey) { return getRuntimeEngine(CorrelationKeyContext.get(correlationKey)); }
/** * Gets a RuntimeEngine for a {@link Context} associated with the processInstanceId. * @param processInstanceId the processInstanceId * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine(Long processInstanceId) { return getRuntimeEngine(ProcessInstanceIdContext.get(processInstanceId)); }
/** * Gets a RuntimeEngine for a {@link Context} associated with the correlationKey. * @param correlationKey the correlationKey * @return the RuntimeEngine */ public RuntimeEngine getRuntimeEngine(CorrelationKey correlationKey) { return getRuntimeEngine(CorrelationKeyContext.get(correlationKey)); }
private KnowledgeRuntimeEngine getRuntimeEngine(Exchange exchange, Message message) throws HandlerException { RuntimeEngine runtimeEngine = null; Long processInstanceId = getProcessInstanceId(exchange, message); if (processInstanceId != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(processInstanceId); } if (runtimeEngine == null) { CorrelationKey correlationKey = getCorrelationKey(exchange, message); if (correlationKey != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(correlationKey); } } if (runtimeEngine == null) { throw new HandlerException("runtimeEngine == null"); } return (KnowledgeRuntimeEngine)runtimeEngine; }
private KnowledgeRuntimeEngine getRuntimeEngine(Exchange exchange, Message message) throws HandlerException { RuntimeEngine runtimeEngine = null; Long processInstanceId = getProcessInstanceId(exchange, message); if (processInstanceId != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(processInstanceId); } if (runtimeEngine == null) { CorrelationKey correlationKey = getCorrelationKey(exchange, message); if (correlationKey != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(correlationKey); } } if (runtimeEngine == null) { throw new HandlerException("runtimeEngine == null"); } return (KnowledgeRuntimeEngine)runtimeEngine; }
private KnowledgeRuntimeEngine getRuntimeEngine(Exchange exchange, Message message) throws HandlerException { RuntimeEngine runtimeEngine = null; Long processInstanceId = getProcessInstanceId(exchange, message); if (processInstanceId != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(processInstanceId); } if (runtimeEngine == null) { CorrelationKey correlationKey = getCorrelationKey(exchange, message); if (correlationKey != null) { runtimeEngine = _runtimeManager.getRuntimeEngine(correlationKey); } } if (runtimeEngine == null) { throw new HandlerException("runtimeEngine == null"); } return (KnowledgeRuntimeEngine)runtimeEngine; }
private synchronized void disposeSingletonRuntimeEngine() { if (_singletonRuntimeManager != null) { try { _singletonRuntimeManager.disposeRuntimeEngine(_singletonRuntimeManager.getRuntimeEngine()); } finally { try { _singletonRuntimeManager.close(); } finally { _singletonRuntimeManager = null; } } } }
/** * Gets a task service. * @param serviceDomainName the service domain name * @param serviceName the service name * @return the task service */ public static final synchronized BPMTaskService getTaskService(QName serviceDomainName, QName serviceName) { KnowledgeRuntimeManager runtimeManager = KnowledgeRuntimeManagerRegistry.getRuntimeManager(serviceDomainName, serviceName); if (runtimeManager != null) { RuntimeEngine runtimeEngine = runtimeManager.getRuntimeEngine(); if (runtimeEngine != null) { final TaskService taskService = runtimeEngine.getTaskService(); if (taskService != null) { InvocationHandler ih = new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(taskService, args); } }; return (BPMTaskService)Proxy.newProxyInstance(BPMTaskService.class.getClassLoader(), new Class[]{BPMTaskService.class}, ih); } } } return null; }
/** * Gets a task service. * @param serviceDomainName the service domain name * @param serviceName the service name * @return the task service */ public static final synchronized BPMTaskService getTaskService(QName serviceDomainName, QName serviceName) { KnowledgeRuntimeManager runtimeManager = KnowledgeRuntimeManagerRegistry.getRuntimeManager(serviceDomainName, serviceName); if (runtimeManager != null) { RuntimeEngine runtimeEngine = runtimeManager.getRuntimeEngine(); if (runtimeEngine != null) { final TaskService taskService = runtimeEngine.getTaskService(); if (taskService != null) { InvocationHandler ih = new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(taskService, args); } }; return (BPMTaskService)Proxy.newProxyInstance(BPMTaskService.class.getClassLoader(), new Class[]{BPMTaskService.class}, ih); } } } return null; }
/** * Gets a task service. * @param serviceDomainName the service domain name * @param serviceName the service name * @return the task service */ public static final synchronized BPMTaskService getTaskService(QName serviceDomainName, QName serviceName) { KnowledgeRuntimeManager runtimeManager = KnowledgeRuntimeManagerRegistry.getRuntimeManager(serviceDomainName, serviceName); if (runtimeManager != null) { RuntimeEngine runtimeEngine = runtimeManager.getRuntimeEngine(); if (runtimeEngine != null) { final TaskService taskService = runtimeEngine.getTaskService(); if (taskService != null) { InvocationHandler ih = new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return method.invoke(taskService, args); } }; return (BPMTaskService)Proxy.newProxyInstance(BPMTaskService.class.getClassLoader(), new Class[]{BPMTaskService.class}, ih); } } } return null; }