public interface InternalAgenda
extends org.kie.api.runtime.rule.Agenda
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 |
addAgendaGroup(AgendaGroup agendaGroup) |
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
Activation s |
void |
cancelActivation(Tuple leftTuple,
PropagationContext context,
Activation activation,
TerminalNode rtn) |
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(InternalAgendaGroup agendaGroup)
Clears all Activations from an Agenda 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() |
AgendaGroup |
getFocus() |
String |
getFocusName()
Returns the name of the agenda group that currently
has the focus
|
KnowledgeHelper |
getKnowledgeHelper() |
InternalAgendaGroup |
getNextFocus() |
default PropagationList |
getPropagationList() |
RuleFlowGroup |
getRuleFlowGroup(String name) |
AgendaGroup[] |
getStack() |
LinkedList<AgendaGroup> |
getStackList() |
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 |
registerExpiration(PropagationContext expirationContext) |
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() |
InternalWorkingMemory getWorkingMemory()
void setFocus(String name)
void activateRuleFlowGroup(String name)
RuleFlowGroup
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.void activateRuleFlowGroup(String name, long processInstanceId, String nodeInstanceId)
RuleFlowGroup
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.void deactivateRuleFlowGroup(String name)
RuleFlowGroup
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 agendaAgendaGroup[] getAgendaGroups()
AgendaGroup[] getStack()
int focusStackSize()
AgendGroups in the focus stack returning the total number of Activation
s
Activation
s on the focus stackint agendaSize()
Activation
sActivation[] getActivations()
void clearAndCancel()
void clearAndCancelAgendaGroup(String name)
void clearAndCancelAgendaGroup(InternalAgendaGroup agendaGroup)
void clearAndCancelActivationGroup(String name)
void clearAndCancelActivationGroup(InternalActivationGroup activationGroup)
void clearAndCancelRuleFlowGroup(String name)
String getFocusName()
int fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter, int fireCount, int fireLimit) throws ConsequenceException
ConsequenceException
AgendaItem createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple, int salience, PropagationContext context, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)
void cancelActivation(Tuple leftTuple, PropagationContext context, Activation activation, TerminalNode rtn)
void modifyActivation(AgendaItem activation, boolean previouslyActive)
void addAgendaGroup(AgendaGroup agendaGroup)
boolean isDeclarativeAgenda()
boolean isRuleInstanceAgendaItem(String ruleflowGroupName, String ruleName, long processInstanceId)
void setWorkingMemory(InternalWorkingMemory workingMemory)
int fireAllRules(org.kie.api.runtime.rule.AgendaFilter agendaFilter, int fireLimit)
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.void halt()
void fireUntilHalt()
void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
agendaFilter
- filters the activations that may fireboolean dispose(InternalWorkingMemory wm)
boolean isAlive()
void reset()
AgendaGroup getAgendaGroup(String name)
getAgendaGroup
in interface org.kie.api.runtime.rule.Agenda
AgendaGroup getAgendaGroup(String name, InternalKnowledgeBase kBase)
InternalActivationGroup getActivationGroup(String name)
getActivationGroup
in interface org.kie.api.runtime.rule.Agenda
RuleFlowGroup getRuleFlowGroup(String name)
getRuleFlowGroup
in interface org.kie.api.runtime.rule.Agenda
void setActivationsFilter(ActivationsFilter filter)
ActivationsFilter getActivationsFilter()
RuleAgendaItem createRuleAgendaItem(int salience, PathMemory rs, TerminalNode rtn)
RuleAgendaItem peekNextRule()
boolean isFiring()
void executeTask(ExecutableEntry executable)
void executeFlush()
void activate()
void deactivate()
boolean tryDeactivate()
void insertAndStageActivation(AgendaItem activation)
void addEagerRuleAgendaItem(RuleAgendaItem item)
void removeEagerRuleAgendaItem(RuleAgendaItem item)
void addQueryAgendaItem(RuleAgendaItem item)
void removeQueryAgendaItem(RuleAgendaItem item)
boolean setFocus(AgendaGroup agendaGroup)
void stageLeftTuple(RuleAgendaItem ruleAgendaItem, AgendaItem justified)
Map<String,InternalAgendaGroup> getAgendaGroupsMap()
void addAgendaGroupOnStack(AgendaGroup agendaGroup)
void evaluateEagerList()
Map<String,InternalActivationGroup> getActivationGroupsMap()
InternalAgendaGroup getNextFocus()
LinkedList<AgendaGroup> getStackList()
AgendaGroup getFocus()
int sizeOfRuleFlowGroup(String s)
void addItemToActivationGroup(AgendaItem item)
boolean isRuleActiveInRuleFlowGroup(String ruleflowGroupName, String ruleName, long processInstanceId)
void registerExpiration(PropagationContext expirationContext)
void addPropagation(PropagationEntry propagationEntry)
void flushPropagations()
void notifyWaitOnRest()
Iterator<PropagationEntry> getActionsIterator()
boolean hasPendingPropagations()
void handleException(InternalWorkingMemory wm, Activation activation, Exception e)
boolean isParallelAgenda()
KnowledgeHelper getKnowledgeHelper()
default PropagationList getPropagationList()
Copyright © 2001–2019 JBoss by Red Hat. All rights reserved.