Package org.drools.kiesession.agenda
Class DefaultAgenda
java.lang.Object
org.drools.kiesession.agenda.DefaultAgenda
- All Implemented Interfaces:
ActivationsManager,InternalAgenda,Agenda
- Direct Known Subclasses:
PartitionedDefaultAgenda
Rule-firing Agenda.
Since many rules may be matched by a single assertObject(...) all scheduled
actions are placed into the Agenda.
While processing a scheduled action, it may update or retract objects in other scheduled actions, which must then be removed from the agenda. Non-invalidated actions are left on the agenda, and are executed in turn.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected static final org.slf4j.Loggerprotected final InternalWorkingMemoryFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()voidactivateRuleFlowGroup(String name) voidactivateRuleFlowGroup(String name, String processInstanceId, String nodeInstanceId) voidactivateRuleFlowGroup(InternalRuleFlowGroup group, Object processInstanceId, String nodeInstanceId) voidvoidaddItemToActivationGroup(InternalMatch internalMatch) voidaddPropagation(PropagationEntry propagationEntry) voidvoidcancelActivation(InternalMatch internalMatch) voidclear()voidvoidvoidclearAndCancelActivationGroup(InternalActivationGroup activationGroup) voidvoidcreateAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple, int salience, PropagationContext context, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup) protected PropagationListcreateRuleAgendaItem(int salience, PathMemory rs, TerminalNode rtn) voidbooleanprotected voiddoRetract(PropagationContext ectx) voidvoidvoidvoidexecuteTask(ExecutableEntry executable) intfireAllRules(AgendaFilter agendaFilter, int fireLimit) voidvoidfireUntilHalt(AgendaFilter agendaFilter) voidgetActivationGroup(String name) getAgendaGroup(String name) getRuleFlowGroup(String name) voidhalt()voidvoidhandleException(InternalMatch internalMatch, Exception e) booleanvoidbooleanisAlive()booleanbooleanisFiring()booleanprotected booleanisPendingRemoveFactHandleFromStore(InternalFactHandle factHandle) booleanisRuleActiveInRuleFlowGroup(String ruleflowGroupName, String ruleName, String processInstanceId) voidvoidvoidvoidvoidreset()voidprotected voidretractFactHandle(PropagationContext ectx, InternalFactHandle factHandle) voidbooleanbooleansetFocus(PropagationContext ctx, String name) intsizeOfRuleFlowGroup(String name) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.drools.core.common.ActivationsManager
getPartitionedAgenda, getPartitionedAgendaForNode, stageLeftTuple
-
Field Details
-
log
protected static final org.slf4j.Logger log -
workingMemory
-
activationCounter
protected int activationCounter
-
-
Constructor Details
-
DefaultAgenda
-
-
Method Details
-
createRuleAgendaItem
- Specified by:
createRuleAgendaItemin interfaceActivationsManager
-
createAgendaItem
public InternalMatch createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple, int salience, PropagationContext context, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup) - Specified by:
createAgendaItemin interfaceActivationsManager
-
createPropagationList
-
getPropagationList
-
getWorkingMemory
- Specified by:
getWorkingMemoryin interfaceInternalAgenda
-
addEagerRuleAgendaItem
- Specified by:
addEagerRuleAgendaItemin interfaceActivationsManager
-
removeEagerRuleAgendaItem
- Specified by:
removeEagerRuleAgendaItemin interfaceActivationsManager
-
addQueryAgendaItem
- Specified by:
addQueryAgendaItemin interfaceActivationsManager
-
removeQueryAgendaItem
- Specified by:
removeQueryAgendaItemin interfaceActivationsManager
-
addItemToActivationGroup
- Specified by:
addItemToActivationGroupin interfaceActivationsManager
-
peekNextRule
- Specified by:
peekNextRulein interfaceActivationsManager
-
isDeclarativeAgenda
public boolean isDeclarativeAgenda()- Specified by:
isDeclarativeAgendain interfaceInternalAgenda
-
isRuleActiveInRuleFlowGroup
public boolean isRuleActiveInRuleFlowGroup(String ruleflowGroupName, String ruleName, String processInstanceId) - Specified by:
isRuleActiveInRuleFlowGroupin interfaceInternalAgenda
-
cancelActivation
- Specified by:
cancelActivationin interfaceActivationsManager
-
setFocus
- Specified by:
setFocusin interfaceInternalAgenda
-
setFocus
-
getReteEvaluator
- Specified by:
getReteEvaluatorin interfaceActivationsManager
-
getAgendaGroupsManager
- Specified by:
getAgendaGroupsManagerin interfaceActivationsManager
-
getAgendaEventSupport
- Specified by:
getAgendaEventSupportin interfaceActivationsManager
-
getActivationGroupsMap
- Specified by:
getActivationGroupsMapin interfaceInternalAgenda
-
getActivationGroup
- Specified by:
getActivationGroupin interfaceAgenda
-
getRuleFlowGroup
- Specified by:
getRuleFlowGroupin interfaceAgenda
-
activateRuleFlowGroup
- Specified by:
activateRuleFlowGroupin interfaceInternalAgenda
-
activateRuleFlowGroup
- Specified by:
activateRuleFlowGroupin interfaceInternalAgenda
-
activateRuleFlowGroup
public void activateRuleFlowGroup(InternalRuleFlowGroup group, Object processInstanceId, String nodeInstanceId) -
clear
public void clear() -
getAgendaGroup
- Specified by:
getAgendaGroupin interfaceAgenda
-
reset
public void reset()- Specified by:
resetin interfaceInternalAgenda
-
clearAndCancel
public void clearAndCancel()- Specified by:
clearAndCancelin interfaceInternalAgenda
-
clearAndCancelAgendaGroup
- Specified by:
clearAndCancelAgendaGroupin interfaceInternalAgenda
-
clearAndCancelActivationGroup
- Specified by:
clearAndCancelActivationGroupin interfaceActivationsManager- Specified by:
clearAndCancelActivationGroupin interfaceInternalAgenda
-
clearAndCancelActivationGroup
- Specified by:
clearAndCancelActivationGroupin interfaceActivationsManager
-
clearAndCancelRuleFlowGroup
- Specified by:
clearAndCancelRuleFlowGroupin interfaceInternalAgenda
-
evaluateEagerList
public void evaluateEagerList()- Specified by:
evaluateEagerListin interfaceActivationsManager
-
evaluateQueriesForRule
- Specified by:
evaluateQueriesForRulein interfaceActivationsManager
-
sizeOfRuleFlowGroup
- Specified by:
sizeOfRuleFlowGroupin interfaceInternalAgenda
-
getFocusName
- Specified by:
getFocusNamein interfaceInternalAgenda
-
fireUntilHalt
public void fireUntilHalt()- Specified by:
fireUntilHaltin interfaceInternalAgenda
-
fireUntilHalt
- Specified by:
fireUntilHaltin interfaceInternalAgenda
-
fireAllRules
- Specified by:
fireAllRulesin interfaceActivationsManager- Specified by:
fireAllRulesin interfaceInternalAgenda
-
isFiring
public boolean isFiring()- Specified by:
isFiringin interfaceActivationsManager
-
executeTask
- Specified by:
executeTaskin interfaceActivationsManager
-
executeFlush
public void executeFlush()- Specified by:
executeFlushin interfaceInternalAgenda
-
activate
public void activate()- Specified by:
activatein interfaceInternalAgenda
-
deactivate
public void deactivate()- Specified by:
deactivatein interfaceInternalAgenda
-
tryDeactivate
public boolean tryDeactivate()- Specified by:
tryDeactivatein interfaceInternalAgenda
-
halt
public void halt()- Specified by:
haltin interfaceInternalAgenda
-
dispose
- Specified by:
disposein interfaceInternalAgenda
-
isAlive
public boolean isAlive()- Specified by:
isAlivein interfaceInternalAgenda
-
internalHalt
public void internalHalt() -
setActivationsFilter
- Specified by:
setActivationsFilterin interfaceInternalAgenda
-
getActivationsFilter
- Specified by:
getActivationsFilterin interfaceActivationsManager
-
handleException
- Specified by:
handleExceptionin interfaceActivationsManager
-
getKnowledgeHelper
- Specified by:
getKnowledgeHelperin interfaceActivationsManager
-
resetKnowledgeHelper
public void resetKnowledgeHelper()- Specified by:
resetKnowledgeHelperin interfaceActivationsManager
-
haltGroupEvaluation
public void haltGroupEvaluation()- Specified by:
haltGroupEvaluationin interfaceActivationsManager
-
addPropagation
- Specified by:
addPropagationin interfaceActivationsManager
-
flushPropagations
public void flushPropagations()- Specified by:
flushPropagationsin interfaceActivationsManager
-
notifyWaitOnRest
public void notifyWaitOnRest()- Specified by:
notifyWaitOnRestin interfaceInternalAgenda
-
getActionsIterator
- Specified by:
getActionsIteratorin interfaceInternalAgenda
-
hasPendingPropagations
public boolean hasPendingPropagations()- Specified by:
hasPendingPropagationsin interfaceInternalAgenda
-
registerExpiration
- Specified by:
registerExpirationin interfaceActivationsManager
-
doRetract
-
retractFactHandle
-
isPendingRemoveFactHandleFromStore
-
isParallelAgenda
public boolean isParallelAgenda()- Specified by:
isParallelAgendain interfaceInternalAgenda
-