Package org.drools.core.audit.event
Class ActivationLogEvent
- java.lang.Object
-
- org.drools.core.audit.event.LogEvent
-
- org.drools.core.audit.event.ActivationLogEvent
-
public class ActivationLogEvent extends LogEvent
An activation event logged by the WorkingMemoryLogger. It is a snapshot of the event as it was thrown by the working memory. It contains the activation id, the name of the rule and a String representing the declarations of the activation, which is a list of name-value-pairs for each of the declarations in the tuple of the activation. The name is the identifier (=name) of the declaration, and the value is a toString of the value of the parameter, followed by the id of the fact between parentheses. e.g. param1=10; param2=Person[John Doe] Such a String representation is used to create a snapshot of the current state of the activation by storing a toString of the facts bound in the activation. If necessary, this event could be extended to contain a map of declarations too.
-
-
Field Summary
-
Fields inherited from class org.drools.core.audit.event.LogEvent
ACTIVATION_CANCELLED, ACTIVATION_CREATED, AFTER_ACTIVATION_FIRE, AFTER_PACKAGE_ADDED, AFTER_PACKAGE_REMOVED, AFTER_RULE_ADDED, AFTER_RULE_REMOVED, AFTER_RULEFLOW_COMPLETED, AFTER_RULEFLOW_CREATED, AFTER_RULEFLOW_GROUP_ACTIVATED, AFTER_RULEFLOW_GROUP_DEACTIVATED, AFTER_RULEFLOW_NODE_EXITED, AFTER_RULEFLOW_NODE_TRIGGERED, AFTER_TASK_INSTANCE_COMPLETED, AFTER_TASK_INSTANCE_CREATED, AFTER_VARIABLE_INSTANCE_CHANGED, BEFORE_ACTIVATION_FIRE, BEFORE_PACKAGE_ADDED, BEFORE_PACKAGE_REMOVED, BEFORE_RULE_ADDED, BEFORE_RULE_REMOVED, BEFORE_RULEFLOW_COMPLETED, BEFORE_RULEFLOW_CREATED, BEFORE_RULEFLOW_GROUP_ACTIVATED, BEFORE_RULEFLOW_GROUP_DEACTIVATED, BEFORE_RULEFLOW_NODE_EXITED, BEFORE_RULEFLOW_NODE_TRIGGERED, BEFORE_TASK_INSTANCE_COMPLETED, BEFORE_TASK_INSTANCE_CREATED, BEFORE_VARIABLE_INSTANCE_CHANGED, INSERTED, RETRACTED, UPDATED
-
-
Constructor Summary
Constructors Constructor Description ActivationLogEvent()ActivationLogEvent(int type, String activationId, String rule, String declarations, String ruleFlowGroup, String factHandleIds)Create a new activation log event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetActivationId()Returns a unique id for the activation.StringgetDeclarations()Returns a String representation of the declarations in the activation.StringgetFactHandleIds()StringgetRule()Returns the name of the rule of the activation.StringgetRuleFlowGroup()voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Constructor Detail
-
ActivationLogEvent
public ActivationLogEvent()
-
ActivationLogEvent
public ActivationLogEvent(int type, String activationId, String rule, String declarations, String ruleFlowGroup, String factHandleIds)Create a new activation log event.- Parameters:
type- The type of event. This can only be ACTIVATION_CREATED, ACTIVATION_CANCELLED, BEFORE_ACTIVATION_FIRE or AFTER_ACTIVATION_FIRE.activationId- The id of the activationrule- The name of the rule of the activationdeclarations- A String representation of the declarations in the activation.
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Overrides:
readExternalin classLogEvent- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Overrides:
writeExternalin classLogEvent- Throws:
IOException
-
getActivationId
public String getActivationId()
Returns a unique id for the activation.- Returns:
- The id of the activation
-
getRule
public String getRule()
Returns the name of the rule of the activation.- Returns:
- The name of the rule
-
getDeclarations
public String getDeclarations()
Returns a String representation of the declarations in the activation.- Returns:
- A String representation of the declarations.
-
getRuleFlowGroup
public String getRuleFlowGroup()
-
getFactHandleIds
public String getFactHandleIds()
-
-