Package org.drools.core.common
Interface InternalAgenda
-
- All Superinterfaces:
ActivationsManager,org.kie.api.runtime.rule.Agenda
public interface InternalAgenda extends org.kie.api.runtime.rule.Agenda, ActivationsManager
-
-
Field Summary
-
Fields inherited from interface org.drools.core.common.ActivationsManager
ON_AFTER_ALL_FIRES_CONSEQUENCE_NAME, ON_BEFORE_ALL_FIRES_CONSEQUENCE_NAME, ON_DELETE_MATCH_CONSEQUENCE_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivate()voidactivateRuleFlowGroup(java.lang.String name)Activates theRuleFlowGroupwith the given name.voidactivateRuleFlowGroup(java.lang.String name, java.lang.String processInstanceId, java.lang.String nodeInstanceId)Activates theRuleFlowGroupwith the given name.voidclearAndCancel()Clears all Activations from the AgendavoidclearAndCancelActivationGroup(java.lang.String name)Clears all Activations from an Activation-Group.voidclearAndCancelAgendaGroup(java.lang.String name)Clears all Activations from an Agenda Group.voidclearAndCancelRuleFlowGroup(java.lang.String name)voiddeactivate()booleandispose(InternalWorkingMemory wm)voidexecuteFlush()intfireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int fireLimit)Fires all activations currently in agenda that match the given agendaFilter until the fireLimit is reached or no more activations exist.intfireNextItem(org.kie.api.runtime.rule.AgendaFilter filter, int fireCount, int fireLimit)voidfireUntilHalt()Keeps firing activations until a halt is called.voidfireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)Keeps firing activations until a halt is called.java.util.Iterator<PropagationEntry>getActionsIterator()java.util.Map<java.lang.String,InternalActivationGroup>getActivationGroupsMap()java.lang.StringgetFocusName()Returns the name of the agenda group that currently has the focusInternalWorkingMemorygetWorkingMemory()Returns the WorkignMemory for this Agendavoidhalt()Stop agenda from firing any other rule.booleanhasPendingPropagations()booleanisAlive()booleanisDeclarativeAgenda()booleanisParallelAgenda()booleanisRuleActiveInRuleFlowGroup(java.lang.String ruleflowGroupName, java.lang.String ruleName, java.lang.String processInstanceId)booleanisRuleInstanceAgendaItem(java.lang.String ruleflowGroupName, java.lang.String ruleName, java.lang.String processInstanceId)Returns true if there is at least one activation of the given rule name in the given ruleflow group namevoidnotifyWaitOnRest()voidreset()voidsetActivationsFilter(ActivationsFilter filter)Sets a filter that prevents activations from being added to the agenda.voidsetFocus(java.lang.String name)Sets the Agenda's focus to the specified AgendaGroupvoidsetWorkingMemory(InternalWorkingMemory workingMemory)intsizeOfRuleFlowGroup(java.lang.String s)booleantryDeactivate()-
Methods inherited from interface org.drools.core.common.ActivationsManager
addEagerRuleAgendaItem, addItemToActivationGroup, addPropagation, addQueryAgendaItem, cancelActivation, clearAndCancelActivationGroup, createAgendaItem, createRuleAgendaItem, evaluateEagerList, evaluateQueriesForRule, executeTask, flushPropagations, getActivationsFilter, getAgendaEventSupport, getAgendaGroupsManager, getKnowledgeHelper, getPartitionedAgenda, getPartitionedAgendaForNode, getReteEvaluator, handleException, isFiring, peekNextRule, registerExpiration, removeEagerRuleAgendaItem, removeQueryAgendaItem, stageLeftTuple
-
-
-
-
Method Detail
-
getWorkingMemory
InternalWorkingMemory getWorkingMemory()
Returns the WorkignMemory for this Agenda- Returns:
- The WorkingMemory
-
setFocus
void setFocus(java.lang.String name)
Sets the Agenda's focus to the specified AgendaGroup
-
activateRuleFlowGroup
void activateRuleFlowGroup(java.lang.String name)
Activates theRuleFlowGroupwith the given name. All activations in the givenRuleFlowGroupare added to the agenda. As long as theRuleFlowGroupremains active, its activations are automatically added to the agenda.
-
activateRuleFlowGroup
void activateRuleFlowGroup(java.lang.String name, java.lang.String processInstanceId, java.lang.String nodeInstanceId)Activates theRuleFlowGroupwith the given name. All activations in the givenRuleFlowGroupare added to the agenda. As long as theRuleFlowGroupremains active, its activations are automatically added to the agenda. The given processInstanceId and nodeInstanceId define the process context in which thisRuleFlowGroupis used.
-
clearAndCancel
void clearAndCancel()
Clears all Activations from the Agenda
-
clearAndCancelAgendaGroup
void clearAndCancelAgendaGroup(java.lang.String name)
Clears all Activations from an Agenda Group. Any Activations that are also in an Xor Group are removed the the Xor Group.
-
clearAndCancelActivationGroup
void clearAndCancelActivationGroup(java.lang.String name)
Clears all Activations from an Activation-Group. Any Activations that are also in an Agenda Group are removed from the Agenda Group.- Specified by:
clearAndCancelActivationGroupin interfaceActivationsManager
-
clearAndCancelRuleFlowGroup
void clearAndCancelRuleFlowGroup(java.lang.String name)
-
getFocusName
java.lang.String getFocusName()
Returns the name of the agenda group that currently has the focus
-
fireNextItem
int fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter, int fireCount, int fireLimit)
-
isDeclarativeAgenda
boolean isDeclarativeAgenda()
-
isRuleInstanceAgendaItem
boolean isRuleInstanceAgendaItem(java.lang.String ruleflowGroupName, java.lang.String ruleName, java.lang.String processInstanceId)Returns true if there is at least one activation of the given rule name in the given ruleflow group name
-
setWorkingMemory
void setWorkingMemory(InternalWorkingMemory workingMemory)
-
fireAllRules
int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int fireLimit)Fires all activations currently in agenda that match the given agendaFilter until the fireLimit is reached or no more activations exist.- Specified by:
fireAllRulesin interfaceActivationsManager- Parameters:
agendaFilter- the filter on which activations may fire.fireLimit- the maximum number of activations that may fire. If -1, then it will fire until no more activations exist.- Returns:
- the number of rules that were actually fired
-
halt
void halt()
Stop agenda from firing any other rule. It will finish the current rule execution though.
-
fireUntilHalt
void fireUntilHalt()
Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.
-
fireUntilHalt
void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
Keeps firing activations until a halt is called. If in a given moment, there is no activation to fire, it will wait for an activation to be added to an active agenda group or rule flow group.- Parameters:
agendaFilter- filters the activations that may fire
-
dispose
boolean dispose(InternalWorkingMemory wm)
-
isAlive
boolean isAlive()
-
reset
void reset()
-
setActivationsFilter
void setActivationsFilter(ActivationsFilter filter)
Sets a filter that prevents activations from being added to the agenda.
-
executeFlush
void executeFlush()
-
activate
void activate()
-
deactivate
void deactivate()
-
tryDeactivate
boolean tryDeactivate()
-
getActivationGroupsMap
java.util.Map<java.lang.String,InternalActivationGroup> getActivationGroupsMap()
-
sizeOfRuleFlowGroup
int sizeOfRuleFlowGroup(java.lang.String s)
-
isRuleActiveInRuleFlowGroup
boolean isRuleActiveInRuleFlowGroup(java.lang.String ruleflowGroupName, java.lang.String ruleName, java.lang.String processInstanceId)
-
notifyWaitOnRest
void notifyWaitOnRest()
-
getActionsIterator
java.util.Iterator<PropagationEntry> getActionsIterator()
-
hasPendingPropagations
boolean hasPendingPropagations()
-
isParallelAgenda
boolean isParallelAgenda()
-
-