org.drools.spi
Interface Activation

All Superinterfaces:
org.drools.runtime.rule.Activation, Serializable
All Known Subinterfaces:
Queueable
All Known Implementing Classes:
AgendaItem, ScheduledAgendaItem

public interface Activation
extends Serializable, org.drools.runtime.rule.Activation

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(LinkedListNode node)
           
 void addLogicalDependency(LogicalDependency node)
           
 ActivationGroupNode getActivationGroupNode()
           
 ActivationNode getActivationNode()
           
 long getActivationNumber()
          Each PropgationContext is assigned an id from a counter for the WorkingMemory action it represents.
 AgendaGroup getAgendaGroup()
           
 LinkedList getBlocked()
           
 LinkedList getBlockers()
           
 InternalFactHandle getFactHandle()
           
 LinkedList getLogicalDependencies()
           
 PropagationContext getPropagationContext()
          Retrieve the PropagationContext for the Activation
 Rule getRule()
           
 int getSalience()
           
 GroupElement getSubRule()
          Retrieve the subrule that was activated.
 LeftTuple getTuple()
          Retrieve the Tuple that was activated.
 boolean isActivated()
           
 boolean isMatched()
           
 void remove()
          Cancel the Activation by removing it from the Agenda.
 void setActivated(boolean activated)
           
 void setActivationGroupNode(ActivationGroupNode activationGroupNode)
           
 void setActivationNode(ActivationNode ruleFlowGroupNode)
           
 void setBlocked(LinkedList justified)
           
 void setLogicalDependencies(LinkedList justified)
           
 void setMatched(boolean matched)
           
 
Methods inherited from interface org.drools.runtime.rule.Activation
getDeclarationIDs, getDeclarationValue, getFactHandles, getObjects, isActive
 

Method Detail

getRule

Rule getRule()
Specified by:
getRule in interface org.drools.runtime.rule.Activation
Returns:
The rule that was activated.

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

Specified by:
getPropagationContext in interface org.drools.runtime.rule.Activation
Returns:
The propagation context

remove

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


addBlocked

void addBlocked(LinkedListNode node)

getBlocked

LinkedList getBlocked()

setBlocked

void setBlocked(LinkedList justified)

getBlockers

LinkedList getBlockers()

addLogicalDependency

void addLogicalDependency(LogicalDependency node)

getLogicalDependencies

LinkedList getLogicalDependencies()

setLogicalDependencies

void setLogicalDependencies(LinkedList justified)

setActivated

void setActivated(boolean activated)

isActivated

boolean isActivated()

getAgendaGroup

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


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