public interface WorkingMemory extends WorkingMemoryEventManager, WorkingMemoryEntryPoint
RuleBase
.
While this object can be serialised out, it cannot be serialised in. This is because
the RuleBase reference is transient. Please see the RuleBase interface for serializing
in WorkingMemories from an InputStream.Modifier and Type | Method and Description |
---|---|
void |
clearActivationGroup(String group)
Clears the Activation Group, cancellings all its Activations
|
void |
clearAgenda()
Clear the Agenda.
|
void |
clearAgendaGroup(String group)
Clear the Agenda Group, cancelling all its Activations.
|
void |
clearRuleFlowGroup(String group)
Clears the RuleFlow group, cancelling all its Activations
|
int |
fireAllRules()
Fire all items on the agenda until empty.
|
int |
fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
Fire all items on the agenda until empty, using the given AgendaFiler
|
int |
fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter,
int fireLimit)
Fire all items on the agenda using the given AgendaFiler
until empty or at most 'fireLimit' rules have fired
|
int |
fireAllRules(int fireLimit)
Fire all items on the agenda until empty or at most 'fireLimit' rules have fired
|
org.kie.api.runtime.rule.Agenda |
getAgenda()
Returns the Agenda for this WorkingMemory.
|
org.kie.api.runtime.Environment |
getEnvironment() |
org.kie.api.runtime.rule.FactHandle |
getFactHandle(Object object)
Retrieve the
FactHandle associated with an Object. |
org.kie.api.runtime.rule.FactHandle |
getFactHandleByIdentity(Object object) |
Object |
getGlobal(String identifier)
Retrieve a specific instance of global data by identifier
|
GlobalResolver |
getGlobalResolver()
Returns the current GlobalResolver
|
InternalKnowledgeBase |
getKnowledgeBase()
Retrieve the
RuleBase for this working memory. |
Object |
getObject(org.kie.api.runtime.rule.FactHandle handle)
Retrieve the object associated with a
FactHandle . |
org.kie.api.runtime.process.ProcessInstance |
getProcessInstance(long id)
Returns the process instance with the given id.
|
org.kie.api.runtime.process.ProcessInstance |
getProcessInstance(long id,
boolean readOnly) |
Collection<org.kie.api.runtime.process.ProcessInstance> |
getProcessInstances()
Returns the list of process instances of this working memory.
|
QueryResultsImpl |
getQueryResults(String query,
Object... arguments)
Retrieve the QueryResults of the specified query and arguments
|
org.kie.api.time.SessionClock |
getSessionClock()
Returns the session clock instance associated with this session
|
WorkingMemoryEntryPoint |
getWorkingMemoryEntryPoint(String id)
Returns the interface instance for a given entry point, so
that the application can manage entry-point-scoped facts.
|
org.kie.api.runtime.process.WorkItemManager |
getWorkItemManager() |
void |
halt()
Stops rule firing after the current rule finishes executing
|
Iterator<InternalFactHandle> |
iterateFactHandles()
Returns an Iterator for the FactHandles in the Working Memory.
|
Iterator<InternalFactHandle> |
iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
Returns an Iterator for the Objects in the Working Memory.
|
Iterator<?> |
iterateObjects()
Returns an Iterator for the Objects in the Working Memory.
|
Iterator<?> |
iterateObjects(org.kie.api.runtime.ObjectFilter filter)
Returns an Iterator for the Objects in the Working Memory.
|
void |
setAsyncExceptionHandler(AsyncExceptionHandler handler)
Sets the AsyncExceptionHandler to handle exceptions thrown by the Agenda
Scheduler used for duration rules.
|
void |
setFocus(String focus)
Set the focus to the specified AgendaGroup
|
void |
setGlobal(String identifier,
Object value)
Set a specific instance as a global in this working memory.
|
void |
setGlobalResolver(GlobalResolver globalResolver)
Sets the GlobalResolver instance to be used when resolving globals, replaces the current GlobalResolver.
|
org.kie.api.runtime.process.ProcessInstance |
startProcess(String processId)
Starts a new process instance for the process with the given id.
|
org.kie.api.runtime.process.ProcessInstance |
startProcess(String processId,
Map<String,Object> parameters)
Starts a new process instance for the process with the given id.
|
addEventListener, addEventListener, getAgendaEventListeners, getRuleRuntimeEventListeners, removeEventListener, removeEventListener
addEventListener, getKieBaseEventListeners, removeEventListener
org.kie.api.runtime.rule.Agenda getAgenda()
void setGlobal(String identifier, Object value)
identifier
- the identifier under which to populate the datavalue
- the global value, cannot be nullObject getGlobal(String identifier)
org.kie.api.runtime.Environment getEnvironment()
void setGlobalResolver(GlobalResolver globalResolver)
globalResolver
- GlobalResolver getGlobalResolver()
InternalKnowledgeBase getKnowledgeBase()
RuleBase
for this working memory.RuleBase
.int fireAllRules()
int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
int fireAllRules(int fireLimit)
int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int fireLimit)
Object getObject(org.kie.api.runtime.rule.FactHandle handle)
FactHandle
.getObject
in interface org.kie.api.runtime.rule.EntryPoint
handle
- The fact handle.org.kie.api.runtime.rule.FactHandle getFactHandle(Object object)
FactHandle
associated with an Object.getFactHandle
in interface org.kie.api.runtime.rule.EntryPoint
object
- The object.org.kie.api.runtime.rule.FactHandle getFactHandleByIdentity(Object object)
Iterator<?> iterateObjects()
Iterator<?> iterateObjects(org.kie.api.runtime.ObjectFilter filter)
filter
- Iterator<InternalFactHandle> iterateFactHandles()
Iterator<InternalFactHandle> iterateFactHandles(org.kie.api.runtime.ObjectFilter filter)
filter
- void setFocus(String focus)
focus
- QueryResultsImpl getQueryResults(String query, Object... arguments)
query
- The name of the query.arguments
- The arguments used for the queryIllegalArgumentException
- if no query named "query" is found in the rulebasevoid setAsyncExceptionHandler(AsyncExceptionHandler handler)
handler
- void clearAgenda()
void clearAgendaGroup(String group)
void clearActivationGroup(String group)
group
- void clearRuleFlowGroup(String group)
group
- org.kie.api.runtime.process.ProcessInstance startProcess(String processId)
org.kie.api.runtime.process.ProcessInstance startProcess(String processId, Map<String,Object> parameters)
Collection<org.kie.api.runtime.process.ProcessInstance> getProcessInstances()
org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id)
org.kie.api.runtime.process.ProcessInstance getProcessInstance(long id, boolean readOnly)
org.kie.api.runtime.process.WorkItemManager getWorkItemManager()
void halt()
WorkingMemoryEntryPoint getWorkingMemoryEntryPoint(String id)
getWorkingMemoryEntryPoint
in interface WorkingMemoryEntryPoint
id
- the id of the entry point, as defined in the rules fileorg.kie.api.time.SessionClock getSessionClock()
Copyright © 2001–2015 JBoss by Red Hat. All rights reserved.