Package org.drools.ruleunit
Interface RuleUnit
-
public interface RuleUnitRule units represent a purely declarative approach to partition a rules set into smaller units, binding different data sources to those units and orchestrate the execution of the individual unit. A rule unit is an aggregate of data sources, global variables and rules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRuleUnit.Identity
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default RuleUnit.IdentitygetUnitIdentity()Defines the identity of this RuleUnit.default voidonEnd()Called when the evaluation of this unit terminatesdefault voidonResume()Called when the execution of unit is resumed (only for runUntilHalt)default voidonStart()Called when the rule engine starts evaluating the unitdefault voidonSuspend()Called when the execution of unit is suspended (only for runUntilHalt)default voidonYield(RuleUnit other)Called when the consequence of rule in this rule unit triggers the execution of a different unit
-
-
-
Method Detail
-
getUnitIdentity
default RuleUnit.Identity getUnitIdentity()
Defines the identity of this RuleUnit. By default it corresponds to the unit's class.- Returns:
- The identity of this RuleUnit
-
onStart
default void onStart()
Called when the rule engine starts evaluating the unit
-
onEnd
default void onEnd()
Called when the evaluation of this unit terminates
-
onSuspend
default void onSuspend()
Called when the execution of unit is suspended (only for runUntilHalt)
-
onResume
default void onResume()
Called when the execution of unit is resumed (only for runUntilHalt)
-
onYield
default void onYield(RuleUnit other)
Called when the consequence of rule in this rule unit triggers the execution of a different unit- Parameters:
other- The called unit
-
-