Rule Execution Server API

ilog.rules.res.xu.event
Interface IlrRuleEngineEvent

All Superinterfaces:
ilog.rules.res.xu.event.internal.IlrXUEvent

public interface IlrRuleEngineEvent
extends ilog.rules.res.xu.event.internal.IlrXUEvent

IlrRuleEngineEvent represents an engine event.

Since:
7.0

Field Summary
static int ADD_INSTANCE
          The event code when a rule instance has been added to the agenda.
static int ADD_RULE
          The event code when a rule is added in the ruleset.
static int BEGIN_INSTANCE
          The event code when a rule instance has been selected to fire, and the first action is about to be executed.
static int BEGIN_SEQUENTIAL_INSTANCE
          The event code when a sequential instance: Has been added and selected to fire. Its first action is about to be executed.
static int BEGIN_TASK
          The event code when a task is about to be executed.
static int CONNECT
          The event code when an IlrTool is connected to the rule engine.
static int DEFINE_FUNCTION
          The event code when a function is defined in the ruleset.
static int DISCONNECT
          The event code when an IlrTool is disconnected.
static int END_INSTANCE
          The event code when a rule instance has finished executing the action part.
static int END_RULEFLOW
          The event code when a flow is about to finish its execution.
static int END_SEQUENTIAL_INSTANCE
          The event code when a rule instance has finished executing the action part.
static int END_TASK
          The event code when a task is about to finish execution.
static int INSERT_LOGICAL
          The event code when a logical object has been added into the working memory.
static int INSERT_OBJECT
          The event code when an object has been added to the working memory.
static int REINITIALIZATION_BEGIN
          The event code when the engine is about to be reinitialized.
static int REINITIALIZATION_END
          The event code when engine reinitialization is finished.
static int REMOVE_ALL_INSTANCES
          The event code when all rule instances have been removed from the agenda without having been fired.
static int REMOVE_INSTANCE
          The event code when a rule instance has been removed from the agenda without having been fired.
static int REMOVE_RULE
          The event code when a rule is removed from the ruleset.
static int RESET
          The event code when the IlrContext has been reset.
static int RETRACT_ALL
          The event code when all objects have been removed from the working memory.
static int RETRACT_OBJECT
          The event code when an object has been removed from the working memory.
static int RULESET_PARAMETERS_CHANGED
          The event code when ruleset parameter values have been changed.
static int START_RULEFLOW
          The event code when a flow is about to be executed.
static int UPDATE_OBJECT
          The event code when an object has been updated in the working memory.
 
Method Summary
 String getCanonicalRulesetPath()
          Returns the canonical form of the ruleset path concerned by this event.
 int getCode()
          Returns the code for this event.
 Serializable getConnectionId()
          Returns the id of the CCI connection at the origin of this event.
 IlrContext getEngine()
          Returns the rule engine that raised this event.
 IlrFunction getFunction()
          Returns the function associated with this event.
 Object[] getObjects()
          Returns the objects associated with this event.
 IlrRule getRule()
          Returns the IlrRule associated with this event.
 IlrRuleInstance getRuleInstance()
          Returns the rule instance associated with this event.
 int getRulePriority()
          Returns the priority of the rule associated with this event.
 Map<String,Object> getRulesetParameters()
          Returns the ruleset parameters.
 IlrTask getTask()
          Returns the IlrTask associated with this event.
 Serializable getUserData()
          Returns the user data associated with the CCI connection that has raised this event.
 

Field Detail

DISCONNECT

static final int DISCONNECT
The event code when an IlrTool is disconnected.

Since:
7.0
See Also:
Constant Field Values

ADD_RULE

static final int ADD_RULE
The event code when a rule is added in the ruleset.

Since:
7.0
See Also:
Constant Field Values

REMOVE_RULE

static final int REMOVE_RULE
The event code when a rule is removed from the ruleset.

Since:
7.0
See Also:
Constant Field Values

DEFINE_FUNCTION

static final int DEFINE_FUNCTION
The event code when a function is defined in the ruleset.

Since:
7.0
See Also:
Constant Field Values

INSERT_OBJECT

static final int INSERT_OBJECT
The event code when an object has been added to the working memory.

Since:
7.0
See Also:
Constant Field Values

INSERT_LOGICAL

static final int INSERT_LOGICAL
The event code when a logical object has been added into the working memory.

Since:
7.0
See Also:
Constant Field Values

RETRACT_OBJECT

static final int RETRACT_OBJECT
The event code when an object has been removed from the working memory.

Since:
7.0
See Also:
Constant Field Values

UPDATE_OBJECT

static final int UPDATE_OBJECT
The event code when an object has been updated in the working memory.

Since:
7.0
See Also:
Constant Field Values

RETRACT_ALL

static final int RETRACT_ALL
The event code when all objects have been removed from the working memory.

Since:
7.0
See Also:
Constant Field Values

RESET

static final int RESET
The event code when the IlrContext has been reset.

Since:
7.0
See Also:
Constant Field Values

ADD_INSTANCE

static final int ADD_INSTANCE
The event code when a rule instance has been added to the agenda.

Since:
7.0
See Also:
Constant Field Values

REMOVE_INSTANCE

static final int REMOVE_INSTANCE
The event code when a rule instance has been removed from the agenda without having been fired.

Since:
7.0
See Also:
Constant Field Values

REMOVE_ALL_INSTANCES

static final int REMOVE_ALL_INSTANCES
The event code when all rule instances have been removed from the agenda without having been fired.

Since:
7.0
See Also:
Constant Field Values

BEGIN_INSTANCE

static final int BEGIN_INSTANCE
The event code when a rule instance has been selected to fire, and the first action is about to be executed.

Since:
7.0
See Also:
Constant Field Values

END_INSTANCE

static final int END_INSTANCE
The event code when a rule instance has finished executing the action part.

Since:
7.0
See Also:
Constant Field Values

BEGIN_TASK

static final int BEGIN_TASK
The event code when a task is about to be executed.

Since:
7.0
See Also:
Constant Field Values

END_TASK

static final int END_TASK
The event code when a task is about to finish execution.

Since:
7.0
See Also:
Constant Field Values

START_RULEFLOW

static final int START_RULEFLOW
The event code when a flow is about to be executed. A flow can be:

Since:
7.0
See Also:
Constant Field Values

END_RULEFLOW

static final int END_RULEFLOW
The event code when a flow is about to finish its execution. A flow can be:

Since:
7.0
See Also:
Constant Field Values

BEGIN_SEQUENTIAL_INSTANCE

static final int BEGIN_SEQUENTIAL_INSTANCE
The event code when a sequential instance:

Since:
7.0
See Also:
Constant Field Values

END_SEQUENTIAL_INSTANCE

static final int END_SEQUENTIAL_INSTANCE
The event code when a rule instance has finished executing the action part.

Since:
7.0
See Also:
Constant Field Values

CONNECT

static final int CONNECT
The event code when an IlrTool is connected to the rule engine.

Since:
7.0
See Also:
Constant Field Values

RULESET_PARAMETERS_CHANGED

static final int RULESET_PARAMETERS_CHANGED
The event code when ruleset parameter values have been changed.

Since:
7.0
See Also:
Constant Field Values

REINITIALIZATION_BEGIN

static final int REINITIALIZATION_BEGIN
The event code when the engine is about to be reinitialized.

Since:
7.0
See Also:
Constant Field Values

REINITIALIZATION_END

static final int REINITIALIZATION_END
The event code when engine reinitialization is finished.

Since:
7.0
See Also:
Constant Field Values
Method Detail

getRulesetParameters

Map<String,Object> getRulesetParameters()
Returns the ruleset parameters. This method is only valid for RULESET_PARAMETERS_CHANGED events.

Since:
7.0
Returns:
The ruleset parameters if the parameters have changed. If they have not changed, null is returned.

getCanonicalRulesetPath

String getCanonicalRulesetPath()
Returns the canonical form of the ruleset path concerned by this event.

Since:
7.0
Returns:
The ruleset path.

getCode

int getCode()
Returns the code for this event.

Since:
7.0
Returns:
The code for this event.
See Also:
ADD_INSTANCE, ADD_RULE, BEGIN_INSTANCE, BEGIN_SEQUENTIAL_INSTANCE, BEGIN_TASK, CONNECT, DEFINE_FUNCTION, DISCONNECT, END_INSTANCE, END_RULEFLOW, END_SEQUENTIAL_INSTANCE, END_TASK, INSERT_LOGICAL, INSERT_OBJECT, REMOVE_ALL_INSTANCES, REMOVE_INSTANCE, REMOVE_RULE, RESET, RETRACT_ALL, RETRACT_OBJECT, START_RULEFLOW, UPDATE_OBJECT

getEngine

IlrContext getEngine()
Returns the rule engine that raised this event.

The IlrContext instance returned should NOT be used as an identifier for the rule engine event and must NOT be modified.

An IlrContext instance can be changed during the rule session life cycle, for example for transaction rollback.

Since:
7.0
Returns:
The engine of the event raised. Returns null if the engine is not RCE.

getTask

IlrTask getTask()
Returns the IlrTask associated with this event. This method is only valid for the following subset of events:

The returned instance must NOT be modified.

Since:
7.0
Returns:
An IlrTask instance.

getRule

IlrRule getRule()
Returns the IlrRule associated with this event. This method is only valid for the following events:

The returned instance must NOT be modified.

Since:
7.0
Returns:
An instance of IlrRule associated with this event.

getRulePriority

int getRulePriority()
Returns the priority of the rule associated with this event.

This method is only valid for the following events:

Since:
7.0
Returns:
The priority of the rule associated with this event.

getObjects

Object[] getObjects()
Returns the objects associated with this event. This method is only valid for the following events:

The returned objects must NOT be modified.

Since:
7.0
Returns:
The objects associated with this event.

getRuleInstance

IlrRuleInstance getRuleInstance()
Returns the rule instance associated with this event. This method is only valid for the following events:

The returned instance must NOT be modified.

Since:
7.0
Returns:
The IlrRuleInstance instance associated with this event.

getFunction

IlrFunction getFunction()
Returns the function associated with this event. This method is only valid for the DEFINE_FUNCTION event.

The returned instance must NOT be modified.

Since:
7.0
Returns:
The IlrFunction instance associated with this event.

getConnectionId

Serializable getConnectionId()
Returns the id of the CCI connection at the origin of this event.

Since:
7.0
Returns:
The id of the CCI connection that is at the origin of the event. If a CCI connection is not at the origin of the event, null is returned.

getUserData

Serializable getUserData()
Returns the user data associated with the CCI connection that has raised this event.

A userData object represents an Execution Unit (XU) connection. Use the Session API to set userData. Each rule session instance has an underlying XU connection. Typically, userData should be used to identify a rule session.

For a userData object: Serialization is utilized because userData can be used in transactions.

Since:
7.0
Returns:
The user data.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2012