Package org.drools.core.command.impl
Class CommandBasedStatefulKnowledgeSession
- java.lang.Object
-
- org.drools.core.impl.AbstractRuntime
-
- org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession
-
- All Implemented Interfaces:
org.kie.api.event.KieRuntimeEventManager,org.kie.api.event.process.ProcessEventManager,org.kie.api.event.rule.RuleRuntimeEventManager,org.kie.api.runtime.CommandExecutor,org.kie.api.runtime.KieRuntime,org.kie.api.runtime.KieSession,org.kie.api.runtime.process.ProcessRuntime,org.kie.api.runtime.process.StatefulProcessSession,org.kie.api.runtime.rule.EntryPoint,org.kie.api.runtime.rule.RuleRuntime,org.kie.api.runtime.rule.StatefulRuleSession,org.kie.internal.process.CorrelationAwareProcessRuntime,org.kie.internal.runtime.StatefulKnowledgeSession
public class CommandBasedStatefulKnowledgeSession extends AbstractRuntime implements org.kie.internal.runtime.StatefulKnowledgeSession, org.kie.internal.process.CorrelationAwareProcessRuntime
-
-
Field Summary
-
Fields inherited from class org.drools.core.impl.AbstractRuntime
logger
-
-
Constructor Summary
Constructors Constructor Description CommandBasedStatefulKnowledgeSession(org.kie.api.runtime.ExecutableRunner runner)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidabortProcessInstance(long id)voidaddEventListener(org.kie.api.event.process.ProcessEventListener listener)voidaddEventListener(org.kie.api.event.rule.AgendaEventListener listener)voidaddEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)org.kie.api.runtime.process.ProcessInstancecreateProcessInstance(String processId, Map<String,Object> parameters)org.kie.api.runtime.process.ProcessInstancecreateProcessInstance(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)voiddelete(org.kie.api.runtime.rule.FactHandle handle)voiddelete(org.kie.api.runtime.rule.FactHandle handle, org.kie.api.runtime.rule.FactHandle.State fhState)voiddestroy()voiddispose()<T> Texecute(org.kie.api.command.Command<T> command)intfireAllRules()intfireAllRules(int max)intfireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)intfireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int max)voidfireUntilHalt()voidfireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)org.kie.api.runtime.rule.AgendagetAgenda()Collection<org.kie.api.event.rule.AgendaEventListener>getAgendaEventListeners()org.kie.api.runtime.CalendarsgetCalendars()Map<String,org.kie.api.runtime.Channel>getChannels()org.kie.api.runtime.rule.EntryPointgetEntryPoint(String name)StringgetEntryPointId()Collection<? extends org.kie.api.runtime.rule.EntryPoint>getEntryPoints()org.kie.api.runtime.EnvironmentgetEnvironment()longgetFactCount()org.kie.api.runtime.rule.FactHandlegetFactHandle(Object object)<T extends org.kie.api.runtime.rule.FactHandle>
Collection<T>getFactHandles()<T extends org.kie.api.runtime.rule.FactHandle>
Collection<T>getFactHandles(org.kie.api.runtime.ObjectFilter filter)ObjectgetGlobal(String identifier)org.kie.api.runtime.GlobalsgetGlobals()intgetId()Deprecated.longgetIdentifier()org.kie.api.KieBasegetKieBase()<T> TgetKieRuntime(Class<T> cls)ObjectgetObject(org.kie.api.runtime.rule.FactHandle factHandle)Collection<? extends Object>getObjects()Collection<? extends Object>getObjects(org.kie.api.runtime.ObjectFilter filter)Collection<org.kie.api.event.process.ProcessEventListener>getProcessEventListeners()org.kie.api.runtime.process.ProcessInstancegetProcessInstance(long id)org.kie.api.runtime.process.ProcessInstancegetProcessInstance(long id, boolean readOnly)org.kie.api.runtime.process.ProcessInstancegetProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)Collection<org.kie.api.runtime.process.ProcessInstance>getProcessInstances()org.kie.api.runtime.rule.QueryResultsgetQueryResults(String query, Object... arguments)Collection<org.kie.api.event.rule.RuleRuntimeEventListener>getRuleRuntimeEventListeners()org.kie.api.runtime.ExecutableRunnergetRunner()<T extends org.kie.api.time.SessionClock>
TgetSessionClock()org.kie.api.runtime.KieSessionConfigurationgetSessionConfiguration()WorkItemManagergetWorkItemManager()voidhalt()org.kie.api.runtime.rule.FactHandleinsert(Object object)org.kie.api.runtime.rule.LiveQueryopenLiveQuery(String query, Object[] arguments, org.kie.api.runtime.rule.ViewChangedEventListener listener)voidregisterChannel(String name, org.kie.api.runtime.Channel channel)voidremoveEventListener(org.kie.api.event.process.ProcessEventListener listener)voidremoveEventListener(org.kie.api.event.rule.AgendaEventListener listener)voidremoveEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)voidretract(org.kie.api.runtime.rule.FactHandle handle)voidsetGlobal(String identifier, Object object)voidsignalEvent(String type, Object event)voidsignalEvent(String type, Object event, long processInstanceId)org.kie.api.runtime.process.ProcessInstancestartProcess(String processId)org.kie.api.runtime.process.ProcessInstancestartProcess(String processId, Map<String,Object> parameters)org.kie.api.runtime.process.ProcessInstancestartProcess(String processId, Map<String,Object> parameters, org.kie.api.runtime.rule.AgendaFilter agendaFilter)org.kie.api.runtime.process.ProcessInstancestartProcess(String processId, org.kie.api.runtime.rule.AgendaFilter agendaFilter)org.kie.api.runtime.process.ProcessInstancestartProcess(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)org.kie.api.runtime.process.ProcessInstancestartProcessFromNodeIds(String processId, Map<String,Object> params, String... nodeIds)org.kie.api.runtime.process.ProcessInstancestartProcessFromNodeIds(String processId, org.kie.internal.process.CorrelationKey key, Map<String,Object> params, String... nodeIds)org.kie.api.runtime.process.ProcessInstancestartProcessInstance(long processInstanceId)voidsubmit(org.kie.api.runtime.KieSession.AtomicAction action)voidunregisterChannel(String name)voidupdate(org.kie.api.runtime.rule.FactHandle handle, Object object)voidupdate(org.kie.api.runtime.rule.FactHandle handle, Object object, String... modifiedProperties)-
Methods inherited from class org.drools.core.impl.AbstractRuntime
getLogger, setLogger
-
-
-
-
Method Detail
-
getId
@Deprecated public int getId()
Deprecated.Deprecated usegetIdentifier()instead- Specified by:
getIdin interfaceorg.kie.api.runtime.KieSession
-
getIdentifier
public long getIdentifier()
- Specified by:
getIdentifierin interfaceorg.kie.api.runtime.KieSession
-
getProcessInstance
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id)
- Specified by:
getProcessInstancein interfaceorg.kie.api.runtime.process.ProcessRuntime
-
getProcessInstance
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id, boolean readOnly)- Specified by:
getProcessInstancein interfaceorg.kie.api.runtime.process.ProcessRuntime
-
abortProcessInstance
public void abortProcessInstance(long id)
- Specified by:
abortProcessInstancein interfaceorg.kie.api.runtime.process.ProcessRuntime
-
getRunner
public org.kie.api.runtime.ExecutableRunner getRunner()
-
getProcessInstances
public Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
- Specified by:
getProcessInstancesin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
getWorkItemManager
public WorkItemManager getWorkItemManager()
- Specified by:
getWorkItemManagerin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
signalEvent
public void signalEvent(String type, Object event)
- Specified by:
signalEventin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
signalEvent
public void signalEvent(String type, Object event, long processInstanceId)
- Specified by:
signalEventin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
startProcess
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId)
- Specified by:
startProcessin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
startProcess
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, Map<String,Object> parameters)
- Specified by:
startProcessin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
startProcess
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, org.kie.api.runtime.rule.AgendaFilter agendaFilter)
- Specified by:
startProcessin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
startProcess
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, Map<String,Object> parameters, org.kie.api.runtime.rule.AgendaFilter agendaFilter)
- Specified by:
startProcessin interfaceorg.kie.api.runtime.process.ProcessRuntime
-
createProcessInstance
public org.kie.api.runtime.process.ProcessInstance createProcessInstance(String processId, Map<String,Object> parameters)
- Specified by:
createProcessInstancein interfaceorg.kie.api.runtime.process.ProcessRuntime
-
startProcessInstance
public org.kie.api.runtime.process.ProcessInstance startProcessInstance(long processInstanceId)
- Specified by:
startProcessInstancein interfaceorg.kie.api.runtime.process.ProcessRuntime
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.kie.api.runtime.KieSession
-
destroy
public void destroy()
- Specified by:
destroyin interfaceorg.kie.api.runtime.KieSession
-
fireAllRules
public int fireAllRules()
- Specified by:
fireAllRulesin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
fireAllRules
public int fireAllRules(int max)
- Specified by:
fireAllRulesin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
fireAllRules
public int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
- Specified by:
fireAllRulesin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
fireAllRules
public int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int max)- Specified by:
fireAllRulesin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
fireUntilHalt
public void fireUntilHalt()
- Specified by:
fireUntilHaltin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
fireUntilHalt
public void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
- Specified by:
fireUntilHaltin interfaceorg.kie.api.runtime.rule.StatefulRuleSession
-
getKieBase
public org.kie.api.KieBase getKieBase()
- Specified by:
getKieBasein interfaceorg.kie.api.runtime.KieRuntime- Specified by:
getKieBasein interfaceorg.kie.internal.runtime.StatefulKnowledgeSession
-
registerChannel
public void registerChannel(String name, org.kie.api.runtime.Channel channel)
- Specified by:
registerChannelin interfaceorg.kie.api.runtime.KieRuntime
-
unregisterChannel
public void unregisterChannel(String name)
- Specified by:
unregisterChannelin interfaceorg.kie.api.runtime.KieRuntime
-
getChannels
public Map<String,org.kie.api.runtime.Channel> getChannels()
- Specified by:
getChannelsin interfaceorg.kie.api.runtime.KieRuntime
-
getAgenda
public org.kie.api.runtime.rule.Agenda getAgenda()
- Specified by:
getAgendain interfaceorg.kie.api.runtime.rule.RuleRuntime
-
getFactHandle
public org.kie.api.runtime.rule.FactHandle getFactHandle(Object object)
- Specified by:
getFactHandlein interfaceorg.kie.api.runtime.rule.EntryPoint
-
getFactHandles
public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles()
- Specified by:
getFactHandlesin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getFactHandles
public <T extends org.kie.api.runtime.rule.FactHandle> Collection<T> getFactHandles(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
getFactHandlesin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getObjects
public Collection<? extends Object> getObjects()
- Specified by:
getObjectsin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getObjects
public Collection<? extends Object> getObjects(org.kie.api.runtime.ObjectFilter filter)
- Specified by:
getObjectsin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getSessionClock
public <T extends org.kie.api.time.SessionClock> T getSessionClock()
- Specified by:
getSessionClockin interfaceorg.kie.api.runtime.KieRuntime
-
getEntryPoint
public org.kie.api.runtime.rule.EntryPoint getEntryPoint(String name)
- Specified by:
getEntryPointin interfaceorg.kie.api.runtime.rule.RuleRuntime
-
getEntryPoints
public Collection<? extends org.kie.api.runtime.rule.EntryPoint> getEntryPoints()
- Specified by:
getEntryPointsin interfaceorg.kie.api.runtime.rule.RuleRuntime
-
halt
public void halt()
- Specified by:
haltin interfaceorg.kie.api.runtime.rule.RuleRuntime
-
insert
public org.kie.api.runtime.rule.FactHandle insert(Object object)
- Specified by:
insertin interfaceorg.kie.api.runtime.rule.EntryPoint
-
submit
public void submit(org.kie.api.runtime.KieSession.AtomicAction action)
- Specified by:
submitin interfaceorg.kie.api.runtime.KieSession
-
getKieRuntime
public <T> T getKieRuntime(Class<T> cls)
- Specified by:
getKieRuntimein interfaceorg.kie.api.runtime.KieSession
-
retract
public void retract(org.kie.api.runtime.rule.FactHandle handle)
- Specified by:
retractin interfaceorg.kie.api.runtime.rule.EntryPoint
-
delete
public void delete(org.kie.api.runtime.rule.FactHandle handle)
- Specified by:
deletein interfaceorg.kie.api.runtime.rule.EntryPoint
-
delete
public void delete(org.kie.api.runtime.rule.FactHandle handle, org.kie.api.runtime.rule.FactHandle.State fhState)- Specified by:
deletein interfaceorg.kie.api.runtime.rule.EntryPoint
-
update
public void update(org.kie.api.runtime.rule.FactHandle handle, Object object)- Specified by:
updatein interfaceorg.kie.api.runtime.rule.EntryPoint
-
update
public void update(org.kie.api.runtime.rule.FactHandle handle, Object object, String... modifiedProperties)- Specified by:
updatein interfaceorg.kie.api.runtime.rule.EntryPoint
-
addEventListener
public void addEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
- Specified by:
addEventListenerin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
addEventListener
public void addEventListener(org.kie.api.event.rule.AgendaEventListener listener)
- Specified by:
addEventListenerin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
getAgendaEventListeners
public Collection<org.kie.api.event.rule.AgendaEventListener> getAgendaEventListeners()
- Specified by:
getAgendaEventListenersin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
getRuleRuntimeEventListeners
public Collection<org.kie.api.event.rule.RuleRuntimeEventListener> getRuleRuntimeEventListeners()
- Specified by:
getRuleRuntimeEventListenersin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
removeEventListener
public void removeEventListener(org.kie.api.event.rule.RuleRuntimeEventListener listener)
- Specified by:
removeEventListenerin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
removeEventListener
public void removeEventListener(org.kie.api.event.rule.AgendaEventListener listener)
- Specified by:
removeEventListenerin interfaceorg.kie.api.event.rule.RuleRuntimeEventManager
-
addEventListener
public void addEventListener(org.kie.api.event.process.ProcessEventListener listener)
- Specified by:
addEventListenerin interfaceorg.kie.api.event.process.ProcessEventManager
-
getProcessEventListeners
public Collection<org.kie.api.event.process.ProcessEventListener> getProcessEventListeners()
- Specified by:
getProcessEventListenersin interfaceorg.kie.api.event.process.ProcessEventManager
-
removeEventListener
public void removeEventListener(org.kie.api.event.process.ProcessEventListener listener)
- Specified by:
removeEventListenerin interfaceorg.kie.api.event.process.ProcessEventManager
-
getGlobal
public Object getGlobal(String identifier)
- Specified by:
getGlobalin interfaceorg.kie.api.runtime.KieRuntime
-
setGlobal
public void setGlobal(String identifier, Object object)
- Specified by:
setGlobalin interfaceorg.kie.api.runtime.KieRuntime
-
getGlobals
public org.kie.api.runtime.Globals getGlobals()
- Specified by:
getGlobalsin interfaceorg.kie.api.runtime.KieRuntime
-
getCalendars
public org.kie.api.runtime.Calendars getCalendars()
- Specified by:
getCalendarsin interfaceorg.kie.api.runtime.KieRuntime
-
getObject
public Object getObject(org.kie.api.runtime.rule.FactHandle factHandle)
- Specified by:
getObjectin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getEnvironment
public org.kie.api.runtime.Environment getEnvironment()
- Specified by:
getEnvironmentin interfaceorg.kie.api.runtime.KieRuntime
-
execute
public <T> T execute(org.kie.api.command.Command<T> command)
- Specified by:
executein interfaceorg.kie.api.runtime.CommandExecutor
-
getQueryResults
public org.kie.api.runtime.rule.QueryResults getQueryResults(String query, Object... arguments)
- Specified by:
getQueryResultsin interfaceorg.kie.api.runtime.rule.RuleRuntime
-
getEntryPointId
public String getEntryPointId()
- Specified by:
getEntryPointIdin interfaceorg.kie.api.runtime.rule.EntryPoint
-
getFactCount
public long getFactCount()
- Specified by:
getFactCountin interfaceorg.kie.api.runtime.rule.EntryPoint
-
openLiveQuery
public org.kie.api.runtime.rule.LiveQuery openLiveQuery(String query, Object[] arguments, org.kie.api.runtime.rule.ViewChangedEventListener listener)
- Specified by:
openLiveQueryin interfaceorg.kie.api.runtime.rule.RuleRuntime
-
getSessionConfiguration
public org.kie.api.runtime.KieSessionConfiguration getSessionConfiguration()
- Specified by:
getSessionConfigurationin interfaceorg.kie.api.runtime.KieRuntime
-
startProcess
public org.kie.api.runtime.process.ProcessInstance startProcess(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)
- Specified by:
startProcessin interfaceorg.kie.internal.process.CorrelationAwareProcessRuntime
-
createProcessInstance
public org.kie.api.runtime.process.ProcessInstance createProcessInstance(String processId, org.kie.internal.process.CorrelationKey correlationKey, Map<String,Object> parameters)
- Specified by:
createProcessInstancein interfaceorg.kie.internal.process.CorrelationAwareProcessRuntime
-
getProcessInstance
public org.kie.api.runtime.process.ProcessInstance getProcessInstance(org.kie.internal.process.CorrelationKey correlationKey)
- Specified by:
getProcessInstancein interfaceorg.kie.internal.process.CorrelationAwareProcessRuntime
-
startProcessFromNodeIds
public org.kie.api.runtime.process.ProcessInstance startProcessFromNodeIds(String processId, org.kie.internal.process.CorrelationKey key, Map<String,Object> params, String... nodeIds)
- Specified by:
startProcessFromNodeIdsin interfaceorg.kie.internal.process.CorrelationAwareProcessRuntime
-
-