A knowledge session for a 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.
insert(Object object, boolean dynamic) Insert a fact registering JavaBean PropertyChangeListeners
on the Object to automatically trigger update calls
if dynamic is true.
Parameters: object - The fact object. Parameters: dynamic - true if Drools should add JavaBeanPropertyChangeListeners to the object.
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.
Fire all items on the agenda using the given AgendaFiler
until empty or at most 'fireLimit' rules have fired
throws: FactException - If a RuntimeException error occurs.
Returns the Agenda for this WorkingMemory. While the WorkingMemory interface is considered public, the Agenda interface
is more subject to change.
the Agenda
Retrieve the QueryResults of the specified query.
Parameters: query - The name of the query. The QueryResults of the specified query.If no results match the query it is empty. throws: IllegalArgumentException - if no query named "query" is found in the rulebase
Retrieve the QueryResults of the specified query and arguments
Parameters: query - The name of the query. Parameters: arguments - The arguments used for the query The QueryResults of the specified query.If no results match the query it is empty. throws: IllegalArgumentException - if no query named "query" is found in the rulebase
Assert a fact.
Parameters: object - The fact object. The new fact-handle associated with the object. throws: FactException - If a RuntimeException error occurs.
Insert a fact registering JavaBean PropertyChangeListeners
on the Object to automatically trigger update calls
if dynamic is true.
Parameters: object - The fact object. Parameters: dynamic - true if Drools should add JavaBeanPropertyChangeListeners to the object. The new fact-handle associated with the object. throws: FactException - If a RuntimeException error occurs.
Returns an Iterator for the Objects in the Working Memory. This Iterator will filter out
any objects that the ObjectFilter does not accept. This Iterator is not thread safe.
Parameters: filter - the Iterator
Returns an Iterator for the Objects in the Working Memory. This Iterator will filter out
any objects that the ObjectFilter does not accept. This Iterator is not thread safe.
Parameters: filter - the Iterator
Set a specific instance as a global in this working memory. Null values will return doing nothing.
The global identifier and its type must be declared in the drl.
Parameters: identifier - the identifier under which to populate the data Parameters: value - the global value, cannot be null
Sets the GlobalResolver instance to be used when resolving globals, replaces the current GlobalResolver.
Typcicaly a delegating GlobalResolver is created that first gets a reference to the current GlobalResolver,
for delegating
Parameters: globalResolver -
Inform the WorkingMemory that a Fact has been modified and that it
should now update the network.
Parameters: handle - The fact-handle associated with the fact to modify. Parameters: object - The new value of the fact. throws: FactException - If a RuntimeException error occurs.