public class CompositeDefaultAgenda extends Object implements Externalizable, InternalAgenda
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
CompositeDefaultAgenda() |
CompositeDefaultAgenda(InternalKnowledgeBase kBase) |
CompositeDefaultAgenda(InternalKnowledgeBase kBase,
boolean initMain) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
activateRuleFlowGroup(String name)
Activates the
RuleFlowGroup with the given name. |
void |
activateRuleFlowGroup(String name,
long processInstanceId,
String nodeInstanceId)
Activates the
RuleFlowGroup with the given name. |
void |
addAgendaGroupOnStack(AgendaGroup agendaGroup) |
void |
addEagerRuleAgendaItem(RuleAgendaItem item) |
void |
addItemToActivationGroup(AgendaItem item) |
void |
addPropagation(PropagationEntry propagationEntry) |
void |
addQueryAgendaItem(RuleAgendaItem item) |
int |
agendaSize()
Iterates all the modules in the focus stack returning the total number of
Activations |
void |
cancelActivation(Activation activation) |
void |
clear() |
void |
clearAndCancel()
Clears all Activations from the Agenda
|
void |
clearAndCancelActivationGroup(InternalActivationGroup activationGroup)
Clears all Activations from an Activation Group.
|
void |
clearAndCancelActivationGroup(String name)
Clears all Activations from an Activation-Group.
|
void |
clearAndCancelAgendaGroup(String name)
Clears all Activations from an Agenda Group.
|
void |
clearAndCancelRuleFlowGroup(String name) |
AgendaItem |
createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple,
int salience,
PropagationContext context,
RuleAgendaItem ruleAgendaItem,
InternalAgendaGroup agendaGroup) |
RuleAgendaItem |
createRuleAgendaItem(int salience,
PathMemory rs,
TerminalNode rtn) |
void |
deactivate() |
void |
deactivateRuleFlowGroup(String name)
Deactivates the
RuleFlowGroup with the given name. |
boolean |
dispose(InternalWorkingMemory wm) |
void |
evaluateEagerList() |
void |
executeFlush() |
void |
executeTask(ExecutableEntry executable) |
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.
|
void |
flushPropagations() |
int |
focusStackSize()
Iterates all the
AgendGroup |
Iterator<PropagationEntry> |
getActionsIterator() |
InternalActivationGroup |
getActivationGroup(String name) |
Map<String,InternalActivationGroup> |
getActivationGroupsMap() |
Activation[] |
getActivations() |
ActivationsFilter |
getActivationsFilter()
Returns the current activations filter or null if none is set
|
AgendaGroup |
getAgendaGroup(String name) |
AgendaGroup |
getAgendaGroup(String name,
InternalKnowledgeBase kBase) |
AgendaGroup[] |
getAgendaGroups() |
Map<String,InternalAgendaGroup> |
getAgendaGroupsMap() |
String |
getFocusName()
Returns the name of the agenda group that currently
has the focus
|
Collection<String> |
getGroupsName() |
KnowledgeHelper |
getKnowledgeHelper() |
InternalAgendaGroup |
getNextFocus() |
DefaultAgenda |
getPartitionedAgenda(int partitionNr) |
DefaultAgenda |
getPartitionedAgendaForNode(NetworkNode node) |
RuleFlowGroup |
getRuleFlowGroup(String name) |
InternalWorkingMemory |
getWorkingMemory()
Returns the WorkignMemory for this Agenda
|
void |
halt()
Stop agenda from firing any other rule.
|
void |
handleException(InternalWorkingMemory wm,
Activation activation,
Exception e) |
boolean |
hasPendingPropagations() |
void |
insertAndStageActivation(AgendaItem activation) |
boolean |
isAlive() |
boolean |
isDeclarativeAgenda() |
boolean |
isFiring() |
boolean |
isParallelAgenda() |
boolean |
isRuleActiveInRuleFlowGroup(String ruleflowGroupName,
String ruleName,
long processInstanceId) |
boolean |
isRuleInstanceAgendaItem(String ruleflowGroupName,
String ruleName,
long processInstanceId)
Returns true if there is at least one activation of the given rule name
in the given ruleflow group name
|
void |
modifyActivation(AgendaItem activation,
boolean previouslyActive)
Adds the activation to the agenda.
|
void |
notifyWaitOnRest() |
RuleAgendaItem |
peekNextRule() |
void |
putOnAgendaGroupsMap(String name,
InternalAgendaGroup group) |
void |
readExternal(ObjectInput in) |
void |
registerExpiration(PropagationContext expirationContext) |
void |
removeAgendaGroup(String name) |
void |
removeEagerRuleAgendaItem(RuleAgendaItem item) |
void |
removeQueryAgendaItem(RuleAgendaItem item) |
void |
reset() |
void |
setActivationsFilter(ActivationsFilter filter)
Sets a filter that prevents activations from being added to
the agenda.
|
boolean |
setFocus(AgendaGroup agendaGroup) |
void |
setFocus(String name)
Sets the Agenda's focus to the specified AgendaGroup
|
void |
setWorkingMemory(InternalWorkingMemory workingMemory) |
int |
sizeOfRuleFlowGroup(String s) |
void |
stageLeftTuple(RuleAgendaItem ruleAgendaItem,
AgendaItem justified) |
boolean |
tryDeactivate() |
void |
writeExternal(ObjectOutput out) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPropagationListpublic CompositeDefaultAgenda()
public CompositeDefaultAgenda(InternalKnowledgeBase kBase)
public CompositeDefaultAgenda(InternalKnowledgeBase kBase, boolean initMain)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic DefaultAgenda getPartitionedAgenda(int partitionNr)
public DefaultAgenda getPartitionedAgendaForNode(NetworkNode node)
public InternalWorkingMemory getWorkingMemory()
InternalAgendagetWorkingMemory in interface InternalAgendapublic void setWorkingMemory(InternalWorkingMemory workingMemory)
setWorkingMemory in interface InternalAgendapublic int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter,
int fireLimit)
InternalAgendafireAllRules in interface InternalAgendaagendaFilter - 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.public RuleAgendaItem createRuleAgendaItem(int salience, PathMemory rs, TerminalNode rtn)
createRuleAgendaItem in interface InternalAgendapublic AgendaItem createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple, int salience, PropagationContext context, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)
createAgendaItem in interface InternalAgendapublic void fireUntilHalt()
InternalAgendafireUntilHalt in interface InternalAgendapublic void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
InternalAgendafireUntilHalt in interface InternalAgendaagendaFilter - filters the activations that may firepublic boolean dispose(InternalWorkingMemory wm)
dispose in interface InternalAgendapublic boolean isAlive()
isAlive in interface InternalAgendapublic void halt()
InternalAgendahalt in interface InternalAgendapublic boolean isFiring()
isFiring in interface InternalAgendapublic void addPropagation(PropagationEntry propagationEntry)
addPropagation in interface InternalAgendapublic void flushPropagations()
flushPropagations in interface InternalAgendapublic void notifyWaitOnRest()
notifyWaitOnRest in interface InternalAgendapublic Iterator<PropagationEntry> getActionsIterator()
getActionsIterator in interface InternalAgendapublic boolean hasPendingPropagations()
hasPendingPropagations in interface InternalAgendapublic void handleException(InternalWorkingMemory wm, Activation activation, Exception e)
handleException in interface InternalAgendapublic void clear()
clear in interface org.kie.api.runtime.rule.Agendapublic void reset()
reset in interface InternalAgendapublic void executeTask(ExecutableEntry executable)
executeTask in interface InternalAgendapublic void executeFlush()
executeFlush in interface InternalAgendapublic void activate()
activate in interface InternalAgendapublic void deactivate()
deactivate in interface InternalAgendapublic boolean tryDeactivate()
tryDeactivate in interface InternalAgendapublic void activateRuleFlowGroup(String name)
InternalAgendaRuleFlowGroup with the given name.
All activations in the given RuleFlowGroup are added to the agenda.
As long as the RuleFlowGroup remains active,
its activations are automatically added to the agenda.activateRuleFlowGroup in interface InternalAgendapublic void activateRuleFlowGroup(String name, long processInstanceId, String nodeInstanceId)
InternalAgendaRuleFlowGroup with the given name.
All activations in the given RuleFlowGroup are added to the agenda.
As long as the RuleFlowGroup remains active,
its activations are automatically added to the agenda.
The given processInstanceId and nodeInstanceId define the process context
in which this RuleFlowGroup is used.activateRuleFlowGroup in interface InternalAgendapublic void deactivateRuleFlowGroup(String name)
InternalAgendaRuleFlowGroup with the given name.
All activations in the given RuleFlowGroup are removed from the agenda.
As long as the RuleFlowGroup remains deactive,
its activations are not added to the agendadeactivateRuleFlowGroup in interface InternalAgendapublic AgendaGroup[] getAgendaGroups()
getAgendaGroups in interface InternalAgendapublic int focusStackSize()
InternalAgendaAgendGroups in the focus stack returning the total number of ActivationsfocusStackSize in interface InternalAgendaActivations on the focus stackpublic int agendaSize()
InternalAgendaActivationsagendaSize in interface InternalAgendapublic Activation[] getActivations()
getActivations in interface InternalAgendapublic void clearAndCancel()
InternalAgendaclearAndCancel in interface InternalAgendapublic void clearAndCancelAgendaGroup(String name)
InternalAgendaclearAndCancelAgendaGroup in interface InternalAgendapublic void clearAndCancelActivationGroup(String name)
InternalAgendaclearAndCancelActivationGroup in interface InternalAgendapublic void clearAndCancelActivationGroup(InternalActivationGroup activationGroup)
InternalAgendaclearAndCancelActivationGroup in interface InternalAgendapublic void clearAndCancelRuleFlowGroup(String name)
clearAndCancelRuleFlowGroup in interface InternalAgendapublic String getFocusName()
InternalAgendagetFocusName in interface InternalAgendapublic int fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter,
int fireCount,
int fireLimit)
fireNextItem in interface InternalAgendapublic void cancelActivation(Activation activation)
cancelActivation in interface InternalAgendapublic void modifyActivation(AgendaItem activation, boolean previouslyActive)
InternalAgendamodifyActivation in interface InternalAgendapublic boolean isDeclarativeAgenda()
isDeclarativeAgenda in interface InternalAgendapublic boolean isRuleInstanceAgendaItem(String ruleflowGroupName, String ruleName, long processInstanceId)
InternalAgendaisRuleInstanceAgendaItem in interface InternalAgendapublic AgendaGroup getAgendaGroup(String name)
getAgendaGroup in interface InternalAgendagetAgendaGroup in interface org.kie.api.runtime.rule.Agendapublic void removeAgendaGroup(String name)
removeAgendaGroup in interface InternalAgendapublic AgendaGroup getAgendaGroup(String name, InternalKnowledgeBase kBase)
getAgendaGroup in interface InternalAgendapublic void setFocus(String name)
InternalAgendasetFocus in interface InternalAgendapublic boolean setFocus(AgendaGroup agendaGroup)
setFocus in interface InternalAgendapublic InternalActivationGroup getActivationGroup(String name)
getActivationGroup in interface InternalAgendagetActivationGroup in interface org.kie.api.runtime.rule.Agendapublic RuleFlowGroup getRuleFlowGroup(String name)
getRuleFlowGroup in interface InternalAgendagetRuleFlowGroup in interface org.kie.api.runtime.rule.Agendapublic void setActivationsFilter(ActivationsFilter filter)
InternalAgendasetActivationsFilter in interface InternalAgendapublic ActivationsFilter getActivationsFilter()
InternalAgendagetActivationsFilter in interface InternalAgendapublic RuleAgendaItem peekNextRule()
peekNextRule in interface InternalAgendapublic void insertAndStageActivation(AgendaItem activation)
insertAndStageActivation in interface InternalAgendapublic void addEagerRuleAgendaItem(RuleAgendaItem item)
addEagerRuleAgendaItem in interface InternalAgendapublic void removeEagerRuleAgendaItem(RuleAgendaItem item)
removeEagerRuleAgendaItem in interface InternalAgendapublic void addQueryAgendaItem(RuleAgendaItem item)
addQueryAgendaItem in interface InternalAgendapublic void removeQueryAgendaItem(RuleAgendaItem item)
removeQueryAgendaItem in interface InternalAgendapublic void stageLeftTuple(RuleAgendaItem ruleAgendaItem, AgendaItem justified)
stageLeftTuple in interface InternalAgendapublic Map<String,InternalAgendaGroup> getAgendaGroupsMap()
getAgendaGroupsMap in interface InternalAgendapublic void putOnAgendaGroupsMap(String name, InternalAgendaGroup group)
putOnAgendaGroupsMap in interface InternalAgendapublic void addAgendaGroupOnStack(AgendaGroup agendaGroup)
addAgendaGroupOnStack in interface InternalAgendapublic void evaluateEagerList()
evaluateEagerList in interface InternalAgendapublic Map<String,InternalActivationGroup> getActivationGroupsMap()
getActivationGroupsMap in interface InternalAgendapublic InternalAgendaGroup getNextFocus()
getNextFocus in interface InternalAgendapublic Collection<String> getGroupsName()
getGroupsName in interface InternalAgendapublic int sizeOfRuleFlowGroup(String s)
sizeOfRuleFlowGroup in interface InternalAgendapublic void addItemToActivationGroup(AgendaItem item)
addItemToActivationGroup in interface InternalAgendapublic boolean isRuleActiveInRuleFlowGroup(String ruleflowGroupName, String ruleName, long processInstanceId)
isRuleActiveInRuleFlowGroup in interface InternalAgendapublic void registerExpiration(PropagationContext expirationContext)
registerExpiration in interface InternalAgendapublic KnowledgeHelper getKnowledgeHelper()
getKnowledgeHelper in interface InternalAgendapublic boolean isParallelAgenda()
isParallelAgenda in interface InternalAgendaCopyright © 2001–2021 JBoss by Red Hat. All rights reserved.