-
Language:
English
-
Language:
English
13.39. Convenience Methods using the Drools Variable
- The call
drools.halt()
terminates rule execution immediately. This is required for returning control to the point whence the current session was put to work withfireUntilHalt()
. - Methods
insert(Object o)
,update(Object o)
andretract(Object o)
can be called ondrools
as well, but due to their frequent use they can be called without the object reference. drools.getWorkingMemory()
returns theWorkingMemory
object.drools.setFocus( String s)
sets the focus to the specified agenda group.drools.getRule().getName()
, called from a rule's RHS, returns the name of the rule.drools.getTuple()
returns the Tuple that matches the currently executing rule, anddrools.getActivation()
delivers the corresponding Activation. (These calls are useful for logging and debugging purposes.)