act_lib variable

The act_lib variable provides access to library methods in the Active Correlation Technology.

Details

The methods that the act_lib variable can access vary depending on the rule language element that contains the expression where the variable is used. See Table 1 .
Table 1. Methods that the act_lib variable can access based on the context of its containing expression
Expression context IACTLibrary methods IExitableActionLibrary methods IActionLibrary methods
<action> within <onActivation> X    
<action> within <onDeactivation> X    
<action> within <onDetection> X X X
<action> within <onLoad> X    
<action> within <onNextEvent> X X X
<action> within <onTimeOut> X   X
<action> within <onTimeWindowComplete> X   X
<action> within <onUnload> X    
<booleanThreshold> X    
<computedThreshold> X    
<computedValue> X    
<computeFunction> X    
<filteringPredicate> X    
<varInitializer> X    

Coding example

The following code accesses the act_lib variable to call the method that exits the rule set:
act_lib.exitRuleSet();

Methods that can be accessed

The methods to which the act_lib variable provides access are defined in the IACTLibrary, IExitableActionLibrary, and IActionLibrary interfaces, as shown in Table 2.
Table 2. Interfaces with corresponding methods and location of Javadoc method descriptions
Interface Methods Location of Javadoc method descriptions
IACTLibrary
  • trace
  • getVariable
  • getBooleanVariable
  • getShortVariable
  • getIntVariable
  • getLongVariable
  • getFloatVariable
  • getDoubleVariable
  • getStringVariable
  • setVariable
  • setBooleanVariable
  • setShortVariable
  • setIntVariable
  • setLongVariable
  • setFloatVariable
  • setDoubleVariable
  • setStringVariable
  • getExternalContext
com.ibm.correlation.IACTLibrary
IActionLibrary
  • forward
  • forwardOnCompletion
  • activate
  • deactivate

The methods that are defined in the IACTLibrary interface are also available to the IActionLibrary interface.

com.ibm.correlation.IActionLibrary
IExitableActionLibrary
  • exitRuleSet
  • exitRuleBlock

The methods that are defined in the IACTLibrary and IActionLibrary interfaces are also available to the IExitableActionLibrary interface.

com.ibm.correlation.IExitableActionLibrary