Package org.drools.core.rule.consequence
Interface KnowledgeHelper
-
- All Superinterfaces:
org.drools.base.rule.consequence.ConsequenceContext,org.kie.api.runtime.KieContext,org.kie.api.runtime.rule.RuleContext,java.io.Serializable
public interface KnowledgeHelper extends org.drools.base.rule.consequence.ConsequenceContext, java.io.SerializableKnowledgeHelper implementation types are injected into consequenses instrumented at compile time and instances passed at runtime. It provides convenience methods for users to interact with the WorkingMemory.Of particular interest is the update method as it allows an object to be modified without having to specify the facthandle, because they are not passed to the consequence at runtime. To achieve this the implementation will need to lookup the fact handle of the object form the WorkingMemory.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description InternalMatchgetMatch()java.lang.ClassLoadergetProjectClassLoader()WorkingMemorygetWorkingMemory()default voidrestoreActivationOnConsequenceFailure(InternalMatch internalMatch)voidsetActivation(InternalMatch internalMatch)-
Methods inherited from interface org.drools.base.rule.consequence.ConsequenceContext
bolster, bolster, delete, delete, delete, delete, don, don, don, don, don, don, don, get, getChannel, getChannels, getContext, getDeclaration, getEntryPoint, getFactHandle, getFactHandle, getRequiredDeclarations, getRule, getTuple, guard, guard, halt, insert, insert, insertAsync, insertLogical, insertLogical, insertLogical, insertLogical, reset, retract, retract, run, run, run, setFocus, shed, shed, update, update, update, update, update
-
-
-
-
Method Detail
-
setActivation
void setActivation(InternalMatch internalMatch)
-
restoreActivationOnConsequenceFailure
default void restoreActivationOnConsequenceFailure(InternalMatch internalMatch)
-
getWorkingMemory
WorkingMemory getWorkingMemory()
-
getMatch
InternalMatch getMatch()
- Specified by:
getMatchin interfaceorg.drools.base.rule.consequence.ConsequenceContext- Specified by:
getMatchin interfaceorg.kie.api.runtime.rule.RuleContext
-
getProjectClassLoader
java.lang.ClassLoader getProjectClassLoader()
- Specified by:
getProjectClassLoaderin interfaceorg.drools.base.rule.consequence.ConsequenceContext
-
-