Drools :: Core 6.1.0.Beta1

org.drools.core.spi
Interface Activation

All Superinterfaces:
org.kie.api.runtime.rule.Match, Serializable
All Known Subinterfaces:
AgendaItem
All Known Implementing Classes:
AgendaItemImpl, RuleAgendaItem, RuleTerminalNodeLeftTuple, ScheduledAgendaItem

public interface Activation
extends Serializable, org.kie.api.runtime.rule.Match

When a Tuple fully matches a rule it is added to the Agenda As an Activation. Each Activation is assigned a number, this number is determined by the WorkingMemory all Activations created from a single insert, update, retract are assgigned the same Activation number.


Method Summary
 void addBlocked(LogicalDependency node)
           
 void addLogicalDependency(LogicalDependency node)
           
 void dequeue()
           
 ActivationGroupNode getActivationGroupNode()
           
 ActivationNode getActivationNode()
           
 long getActivationNumber()
          Each PropgationContext is assigned an id from a counter for the WorkingMemory action it represents.
 InternalAgendaGroup getAgendaGroup()
           
 LinkedList<LogicalDependency> getBlocked()
           
 LinkedList<LinkedListEntry<LogicalDependency>> getBlockers()
           
 Consequence getConsequence()
           
 InternalFactHandle getFactHandle()
           
 LinkedList<LogicalDependency> getLogicalDependencies()
           
 PropagationContext getPropagationContext()
          Retrieve the PropagationContext for the Activation
 int getQueueIndex()
           
 Rule getRule()
           
 int getSalience()
           
 GroupElement getSubRule()
          Retrieve the subrule that was activated.
 LeftTuple getTuple()
          Retrieve the Tuple that was activated.
 boolean isActive()
           
 boolean isMatched()
           
 boolean isQueued()
           
 boolean isRuleAgendaItem()
           
 void remove()
          Cancel the Activation by removing it from the Agenda.
 void setActivationGroupNode(ActivationGroupNode activationGroupNode)
           
 void setActivationNode(ActivationNode ruleFlowGroupNode)
           
 void setActive(boolean active)
           
 void setBlocked(LinkedList<LogicalDependency> justified)
           
 void setLogicalDependencies(LinkedList<LogicalDependency> justified)
           
 void setMatched(boolean matched)
           
 void setQueued(boolean activated)
           
 void setQueueIndex(int index)
           
 
Methods inherited from interface org.kie.api.runtime.rule.Match
getDeclarationIds, getDeclarationValue, getFactHandles, getObjects
 

Method Detail

getRule

Rule getRule()
Specified by:
getRule in interface org.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

LeftTuple getTuple()
Retrieve the Tuple that was activated.

Returns:
The tuple.

getPropagationContext

PropagationContext getPropagationContext()
Retrieve the PropagationContext for the Activation

Returns:
The propagation context

remove

void remove()
Cancel the Activation by removing it from the Agenda.


addBlocked

void addBlocked(LogicalDependency node)

getBlocked

LinkedList<LogicalDependency> getBlocked()

setBlocked

void setBlocked(LinkedList<LogicalDependency> justified)

getBlockers

LinkedList<LinkedListEntry<LogicalDependency>> getBlockers()

addLogicalDependency

void addLogicalDependency(LogicalDependency node)

getLogicalDependencies

LinkedList<LogicalDependency> getLogicalDependencies()

setLogicalDependencies

void setLogicalDependencies(LinkedList<LogicalDependency> 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)

getFactHandle

InternalFactHandle getFactHandle()

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()

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.