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. |
boolean |
addActivation(AgendaItem activation)
Adds the activation to the agenda.
|
void |
addAgendaGroup(AgendaGroup agendaGroup) |
void |
addAgendaGroupOnStack(AgendaGroup agendaGroup) |
void |
addAgendaItemToGroup(AgendaItem item) |
void |
addEagerRuleAgendaItem(RuleAgendaItem item) |
void |
addItemToActivationGroup(AgendaItem item) |
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,
InternalWorkingMemory workingMemory,
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 |
clearAndCancelAndCancel(RuleFlowGroup ruleFlowGroup) |
void |
clearAndCancelRuleFlowGroup(String name) |
boolean |
createActivation(Tuple tuple,
PropagationContext context,
InternalWorkingMemory workingMemory,
TerminalNode rtn) |
AgendaItem |
createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple,
int salience,
PropagationContext context,
RuleAgendaItem ruleAgendaItem,
InternalAgendaGroup agendaGroup) |
boolean |
createPostponedActivation(LeftTuple postponedTuple,
PropagationContext propagationContext,
InternalWorkingMemory workingMemory,
TerminalNode terminalNode) |
RuleAgendaItem |
createRuleAgendaItem(int salience,
PathMemory rs,
TerminalNode rtn) |
void |
deactivate() |
void |
deactivateRuleFlowGroup(String name)
Deactivates the
RuleFlowGroup with the given name. |
void |
evaluateEagerList() |
void |
executeTask(ExecutableEntry executable) |
void |
fireActivation(Activation activation) |
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.
|
void |
fireConsequenceEvent(Activation activation,
String consequenceName) |
int |
fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter,
int fireCount,
int fireLimit) |
boolean |
fireTimedActivation(Activation activation) |
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.
|
int |
focusStackSize()
Iterates all the
AgendGroup |
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
|
InternalAgendaGroup |
getNextFocus() |
RuleFlowGroup |
getRuleFlowGroup(String name) |
Activation[] |
getScheduledActivations() |
<T extends ModedAssertion<T>> |
getScheduledActivationsLinkedList() |
AgendaGroup[] |
getStack() |
LinkedList<AgendaGroup> |
getStackList() |
InternalWorkingMemory |
getWorkingMemory()
Returns the WorkignMemory for this Agenda
|
void |
halt()
Stop agenda from firing any other rule.
|
void |
insertAndStageActivation(AgendaItem activation) |
boolean |
isDeclarativeAgenda() |
boolean |
isFiring() |
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) |
RuleAgendaItem |
peekNextRule() |
void |
registerExpiration(PropagationContext expirationContext) |
void |
removeActivation(AgendaItem activation) |
void |
removeEagerRuleAgendaItem(RuleAgendaItem item) |
void |
removeQueryAgendaItem(RuleAgendaItem item) |
void |
removeScheduleItem(ScheduledAgendaItem item) |
void |
scheduleItem(ScheduledAgendaItem item,
InternalWorkingMemory workingMemory) |
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() |
int |
unstageActivations() |
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 unstageActivations()
int focusStackSize()
AgendGroups in the focus stack returning the total number of Activation
s
Activation
s on the focus stackint agendaSize()
Activation
sActivation[] getActivations()
Activation[] getScheduledActivations()
void clearAndCancel()
void clearAndCancelAgendaGroup(String name)
void clearAndCancelAgendaGroup(InternalAgendaGroup agendaGroup)
void clearAndCancelActivationGroup(String name)
void clearAndCancelActivationGroup(InternalActivationGroup activationGroup)
activationGroup
- void clearAndCancelRuleFlowGroup(String name)
void clearAndCancelAndCancel(RuleFlowGroup ruleFlowGroup)
String getFocusName()
void fireActivation(Activation activation) throws ConsequenceException
ConsequenceException
void fireConsequenceEvent(Activation activation, String consequenceName) throws ConsequenceException
ConsequenceException
boolean fireTimedActivation(Activation activation) throws ConsequenceException
ConsequenceException
void removeScheduleItem(ScheduledAgendaItem item)
<T extends ModedAssertion<T>> LinkedList<ScheduledAgendaItem<T>> getScheduledActivationsLinkedList()
int fireNextItem(org.kie.api.runtime.rule.AgendaFilter filter, int fireCount, int fireLimit) throws ConsequenceException
ConsequenceException
void scheduleItem(ScheduledAgendaItem item, InternalWorkingMemory workingMemory)
AgendaItem createAgendaItem(RuleTerminalNodeLeftTuple rtnLeftTuple, int salience, PropagationContext context, RuleAgendaItem ruleAgendaItem, InternalAgendaGroup agendaGroup)
boolean createActivation(Tuple tuple, PropagationContext context, InternalWorkingMemory workingMemory, TerminalNode rtn)
void cancelActivation(Tuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory, Activation activation, TerminalNode rtn)
boolean addActivation(AgendaItem activation)
activation
- void removeActivation(AgendaItem activation)
void modifyActivation(AgendaItem activation, boolean previouslyActive)
void addAgendaGroup(AgendaGroup agendaGroup)
boolean isDeclarativeAgenda()
boolean isRuleInstanceAgendaItem(String ruleflowGroupName, String ruleName, long processInstanceId)
ruleflowGroupName
- ruleName
- 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.fireLimit
- void halt()
void fireUntilHalt()
void fireUntilHalt(org.kie.api.runtime.rule.AgendaFilter agendaFilter)
agendaFilter
- filters the activations that may fireAgendaGroup 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)
filter
- ActivationsFilter getActivationsFilter()
RuleAgendaItem createRuleAgendaItem(int salience, PathMemory rs, TerminalNode rtn)
RuleAgendaItem peekNextRule()
boolean isFiring()
void executeTask(ExecutableEntry executable)
void activate()
void deactivate()
boolean tryDeactivate()
void insertAndStageActivation(AgendaItem activation)
void addAgendaItemToGroup(AgendaItem item)
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 createPostponedActivation(LeftTuple postponedTuple, PropagationContext propagationContext, InternalWorkingMemory workingMemory, TerminalNode terminalNode)
boolean isRuleActiveInRuleFlowGroup(String ruleflowGroupName, String ruleName, long processInstanceId)
void registerExpiration(PropagationContext expirationContext)
Copyright © 2001–2016 JBoss by Red Hat. All rights reserved.