Rule Execution Server API

ilog.rules.res.session.ruleset
Interface IlrRuleEvent

All Superinterfaces:
IlrExecutionEvent

public interface IlrRuleEvent
extends IlrExecutionEvent

IlrRuleEvent represents an executed rule.

Code example

The following code example shows how to extract the business names of the rules fired:

   protected static void addRuleFiredBusinessNames(IlrExecutionTrace trace,
         List executionEvents,
         List firedRuleBusinessNames) {
     Map allRules = trace.getRules();
     if (executionEvents != null && allRules != null) {
       for (IlrExecutionEvent event : executionEvents) {
         if (event instanceof IlrRuleEvent) {
         String bname = allRules.get(event.getName()).getBusinessName();
         firedRuleBusinessNames.add(bname);
       } else {
         List subEvents = ((IlrTaskEvent) event).getSubExecutionEvents();
         addRuleFiredBusinessNames(trace, subEvents,  firedRuleBusinessNames);
       }
     }
   }
 

Since:
7.0

Method Summary
 IlrRuleAction getAction()
          Deprecated. This method is deprecated because a DE rule can be associated only with a single action
Use getActionName()
 String getActionName()
          Returns the action name of the rule.
 List<Object> getObjects()
          Returns all objects bound by the rule executed.
 int getPriority()
          Returns the rule priority.
 IlrRuleInformation getRuleInformation()
          Returns the rule information.
 
Methods inherited from interface ilog.rules.res.session.ruleset.IlrExecutionEvent
getEndDate, getName, getStartDate
 

Method Detail

getPriority

int getPriority()
Returns the rule priority.

Returns:
The priority of the rule executed.

getObjects

List<Object> getObjects()
Returns all objects bound by the rule executed.

Returns:
All objects bound by the rule.

getRuleInformation

IlrRuleInformation getRuleInformation()
Returns the rule information.

Returns:
The name, business name, properties and UUID of the rule executed.

getAction

IlrRuleAction getAction()
Deprecated. This method is deprecated because a DE rule can be associated only with a single action
Use getActionName()

Since:
8.5
Returns:
the action executed for this rule, when the decision engine (DE) is used.

getActionName

String getActionName()
Returns the action name of the rule.

Returns:
the action name

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013