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
Fields Modifier and Type Field and Description 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 anIlrTool
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 anIlrTool
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 theIlrContext
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
Methods Modifier and Type Method and Description java.lang.String
getCanonicalRulesetPath()
Returns the canonical form of the ruleset path concerned by this event.int
getCode()
Returns the code for this event.java.io.Serializable
getConnectionId()
Returns the id of the CCI connection at the origin of this event.ilog.rules.engine.IlrContext
getEngine()
Returns the rule engine that raised this event.ilog.rules.engine.IlrFunction
getFunction()
Returns the function associated with this event.java.lang.Object[]
getObjects()
Returns the objects associated with this event.ilog.rules.engine.IlrRule
getRule()
Returns theIlrRule
associated with this event.ilog.rules.engine.IlrRuleInstance
getRuleInstance()
Returns the rule instance associated with this event.int
getRulePriority()
Returns the priority of the rule associated with this event.java.util.Map<java.lang.String,java.lang.Object>
getRulesetParameters()
Returns the ruleset parameters.ilog.rules.engine.IlrTask
getTask()
Returns theIlrTask
associated with this event.java.io.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 anIlrTool
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 theIlrContext
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:- The execution of a flow task. This provokes other tasks to execute.
- Reduced to only one rule task or function task.
- 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:- The execution of a flow task. This provokes other tasks to execute.
- Reduced to only one rule task or function task.
- Since:
- 7.0
- See Also:
- Constant Field Values
-
BEGIN_SEQUENTIAL_INSTANCE
static final 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.
- 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 anIlrTool
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
java.util.Map<java.lang.String,java.lang.Object> getRulesetParameters()
Returns the ruleset parameters. This method is only valid forRULESET_PARAMETERS_CHANGED
events.- Since:
- 7.0
- Returns:
- The ruleset parameters if the parameters have changed.
If they have not changed,
null
is returned.
-
getCanonicalRulesetPath
java.lang.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
ilog.rules.engine.IlrContext getEngine()
Returns the rule engine that raised this event.The
IlrContext
instance that is returned should NOT be used as an identifier for the rule engine event and must NOT be modified.The returned instance of
IlrContext
and its members must be used only in the callback of the plug-in providing it. Storing or reusing theIlrContext
instance outside the call of the plug-in callback can lead to wrong behavior.- Since:
- 7.0
- Returns:
- The engine of the event raised. Returns
null
if the engine is not RCE.
-
getTask
ilog.rules.engine.IlrTask getTask()
Returns theIlrTask
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
ilog.rules.engine.IlrRule getRule()
Returns theIlrRule
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
java.lang.Object[] getObjects()
Returns the objects associated with this event. This method is only valid for the following events:BEGIN_SEQUENTIAL_INSTANCE
END_SEQUENTIAL_INSTANCE
INSERT_OBJECT
INSERT_LOGICAL
RETRACT_OBJECT
UPDATE_OBJECT
The returned objects must NOT be modified.
- Since:
- 7.0
- Returns:
- The objects associated with this event.
-
getRuleInstance
ilog.rules.engine.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
ilog.rules.engine.IlrFunction getFunction()
Returns the function associated with this event. This method is only valid for theDEFINE_FUNCTION
event.The returned instance must NOT be modified.
- Since:
- 7.0
- Returns:
- The
IlrFunction
instance associated with this event.
-
getConnectionId
java.io.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
java.io.Serializable getUserData()
Returns the user data associated with the CCI connection that has raised this event.A
For auserData
object represents an Execution Unit (XU) connection. Use the Session API to setuserData
. Each rule session instance has an underlying XU connection. Typically,userData
should be used to identify a rule session.userData
object:- It must be serializable.
- It should be serialized and deserialized rapidly.
- It should not have a large memory footprint.
- It should never be modified after it has been passed to a rule session.
- Never use
==
the check the equality of twouserData
objects.
userData
can be used in transactions.- Since:
- 7.0
- Returns:
- The user data.
-
-