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 void
activate()
void
activateRuleFlowGroup(java.lang.String name)
Activates theRuleFlowGroup
with the given name.void
activateRuleFlowGroup(java.lang.String name, java.lang.String processInstanceId, java.lang.String nodeInstanceId)
Activates theRuleFlowGroup
with the given name.void
clearAndCancel()
Clears all Activations from the Agendavoid
clearAndCancelActivationGroup(java.lang.String name)
Clears all Activations from an Activation-Group.void
clearAndCancelAgendaGroup(java.lang.String name)
Clears all Activations from an Agenda Group.void
clearAndCancelRuleFlowGroup(java.lang.String name)
void
deactivate()
boolean
dispose(InternalWorkingMemory wm)
void
executeFlush()
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.int
fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter, int fireCount, int fireLimit)
void
fireUntilHalt()
Keeps firing activations until a halt is called.void
fireUntilHalt(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.String
getFocusName()
Returns the name of the agenda group that currently has the focusInternalWorkingMemory
getWorkingMemory()
Returns the WorkignMemory for this Agendavoid
halt()
Stop agenda from firing any other rule.boolean
hasPendingPropagations()
boolean
isAlive()
boolean
isDeclarativeAgenda()
boolean
isParallelAgenda()
boolean
isRuleActiveInRuleFlowGroup(java.lang.String ruleflowGroupName, java.lang.String ruleName, java.lang.String processInstanceId)
void
notifyWaitOnRest()
void
reset()
void
setActivationsFilter(ActivationsFilter filter)
Sets a filter that prevents activations from being added to the agenda.void
setFocus(java.lang.String name)
Sets the Agenda's focus to the specified AgendaGroupvoid
setWorkingMemory(InternalWorkingMemory workingMemory)
int
sizeOfRuleFlowGroup(java.lang.String s)
boolean
tryDeactivate()
-
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 theRuleFlowGroup
with the given name. All activations in the givenRuleFlowGroup
are added to the agenda. As long as theRuleFlowGroup
remains 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 theRuleFlowGroup
with the given name. All activations in the givenRuleFlowGroup
are added to the agenda. As long as theRuleFlowGroup
remains active, its activations are automatically added to the agenda. The given processInstanceId and nodeInstanceId define the process context in which thisRuleFlowGroup
is 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:
clearAndCancelActivationGroup
in 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()
-
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:
fireAllRules
in 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()
-
-