Package org.drools.core.spi
Interface Activation<T extends ModedAssertion<T>>
-
- All Superinterfaces:
org.kie.api.runtime.rule.Match
,Serializable
- All Known Subinterfaces:
AgendaItem<T>
- All Known Implementing Classes:
AgendaItemImpl
,RuleAgendaItem
,RuleTerminalNodeLeftTuple
,VisitedAgendaGroup
public interface Activation<T extends ModedAssertion<T>> extends Serializable, org.kie.api.runtime.rule.Match
When aTuple
fully matches a rule it is added to theAgenda
As anActivation
. EachActivation
is assigned a number, this number is determined by theWorkingMemory
allActivations
created from a single insert, update, retract are assgigned the same Activation number.
-
-
Method Summary
-
-
-
Method Detail
-
getRule
RuleImpl getRule()
- Specified by:
getRule
in interfaceorg.kie.api.runtime.rule.Match
- Returns:
- The rule that was activated.
-
getConsequence
Consequence getConsequence()
-
getSalience
int getSalience()
-
getSubRule
GroupElement getSubRule()
Retrieve the subrule that was activated.- Returns:
-
getActivationNumber
long getActivationNumber()
Each PropgationContext is assigned an id from a counter for the WorkingMemory action it represents. All Activations return this id as the ActivationNumber, thus all Activations created from the same PropgationContext will return the same long for this method.- Returns:
- The activation number
-
getTuple
Tuple getTuple()
Retrieve theTuple
that was activated.- Returns:
- The tuple.
-
getPropagationContext
PropagationContext getPropagationContext()
Retrieve thePropagationContext
for theActivation
- Returns:
- The propagation context
-
remove
void remove()
Cancel theActivation
by removing it from theAgenda
.
-
addBlocked
void addBlocked(LogicalDependency<SimpleMode> node)
-
getBlocked
LinkedList<LogicalDependency<SimpleMode>> getBlocked()
-
setBlocked
void setBlocked(LinkedList<LogicalDependency<SimpleMode>> justified)
-
getBlockers
LinkedList<SimpleMode> getBlockers()
-
addLogicalDependency
void addLogicalDependency(LogicalDependency<T> node)
-
getLogicalDependencies
LinkedList<LogicalDependency<T>> getLogicalDependencies()
-
setLogicalDependencies
void setLogicalDependencies(LinkedList<LogicalDependency<T>> justified)
-
setQueued
void setQueued(boolean activated)
-
isQueued
boolean isQueued()
-
getAgendaGroup
InternalAgendaGroup getAgendaGroup()
-
getActivationGroupNode
ActivationGroupNode getActivationGroupNode()
-
setActivationGroupNode
void setActivationGroupNode(ActivationGroupNode activationGroupNode)
-
getActivationNode
ActivationNode getActivationNode()
-
setActivationNode
void setActivationNode(ActivationNode ruleFlowGroupNode)
-
getActivationFactHandle
InternalFactHandle getActivationFactHandle()
-
isMatched
boolean isMatched()
-
setMatched
void setMatched(boolean matched)
-
isActive
boolean isActive()
-
setActive
void setActive(boolean active)
-
isRuleAgendaItem
boolean isRuleAgendaItem()
-
setQueueIndex
void setQueueIndex(int index)
-
getQueueIndex
int getQueueIndex()
-
dequeue
void dequeue()
-
-