org.drools.semantics.python
Class PythonBlockConsequence

java.lang.Object
  extended by org.drools.semantics.python.PythonInterp
      extended by org.drools.semantics.python.PythonBlockConsequence
All Implemented Interfaces:
java.io.Serializable, SemanticComponent, Consequence, RuleComponent

public class PythonBlockConsequence
extends PythonInterp
implements Consequence, SemanticComponent

Python block semantics Consequence.

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
protected  java.lang.String semanticType
           
 
Constructor Summary
protected PythonBlockConsequence(java.lang.String text, Rule rule)
          Construct.
 
Method Summary
 java.lang.String getName()
          Returns the name of the component
 java.lang.String getSemanticType()
           
 void invoke(Tuple tuple)
          Execute the consequence for the supplied matching Tuple.
 
Methods inherited from class org.drools.semantics.python.PythonInterp
getCode, getGlobals, getGlobals, getNode, getRule, getText, setUpDictionary, stripOuterIndention
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

semanticType

protected final java.lang.String semanticType
See Also:
Constant Field Values

name

protected final java.lang.String name
Constructor Detail

PythonBlockConsequence

protected PythonBlockConsequence(java.lang.String text,
                                 Rule rule)
Construct.

Method Detail

getSemanticType

public java.lang.String getSemanticType()
Specified by:
getSemanticType in interface SemanticComponent

getName

public java.lang.String getName()
Description copied from interface: SemanticComponent
Returns the name of the component

Specified by:
getName in interface SemanticComponent

invoke

public void invoke(Tuple tuple)
            throws ConsequenceException
Execute the consequence for the supplied matching Tuple.

Specified by:
invoke in interface Consequence
Parameters:
tuple - The matching tuple.
workingMemory - The working memory session.
Throws:
ConsequenceException - If an error occurs while attempting to invoke the consequence.