Package org.drools.core.rule.consequence
Interface Activation
-
- All Superinterfaces:
org.kie.api.runtime.rule.Match,Serializable
- All Known Subinterfaces:
AgendaItem
- All Known Implementing Classes:
AgendaItemImpl,RuleAgendaItem,RuleTerminalNodeLeftTuple,VisitedAgendaGroup
public interface Activation extends Serializable, org.kie.api.runtime.rule.Match
When aTuplefully matches a rule it is added to theAgendaAs anActivation. EachActivationis assigned a number, this number is determined by theWorkingMemoryallActivationscreated from a single insert, update, retract are assgigned the same Activation number.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voiddequeue()InternalFactHandlegetActivationFactHandle()ActivationGroupNodegetActivationGroupNode()ActivationNodegetActivationNode()longgetActivationNumber()Each PropgationContext is assigned an id from a counter for the WorkingMemory action it represents.InternalAgendaGroupgetAgendaGroup()ConsequencegetConsequence()default List<Object>getObjectsDeep()PropagationContextgetPropagationContext()Retrieve thePropagationContextfor theActivationintgetQueueIndex()RuleImplgetRule()intgetSalience()GroupElementgetSubRule()Retrieve the subrule that was activated.TuplegetTuple()Retrieve theTuplethat was activated.booleanisActive()booleanisMatched()booleanisQueued()booleanisRuleAgendaItem()voidremove()Cancel theActivationby removing it from theAgenda.voidsetActivationGroupNode(ActivationGroupNode activationGroupNode)voidsetActivationNode(ActivationNode ruleFlowGroupNode)voidsetActive(boolean active)voidsetMatched(boolean matched)voidsetQueued(boolean activated)voidsetQueueIndex(int index)
-
-
-
Method Detail
-
getRule
RuleImpl getRule()
- Specified by:
getRulein 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 theTuplethat was activated.- Returns:
- The tuple.
-
getPropagationContext
PropagationContext getPropagationContext()
Retrieve thePropagationContextfor theActivation- Returns:
- The propagation context
-
remove
void remove()
Cancel theActivationby removing it from theAgenda.
-
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()
-
-