Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / Ens.Rule.Log
Private  Storage   

Ens.Rule.Log


persistent class Ens.Rule.Log extends
%Persistent, Ens.Util.BitmapPurge, %XML.Adaptor

Defines an audit trail for the Rules Engine.
Maintains a history of when rules were invoked and the reason for the returned value.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 14 2 1 4 1


Summary


Properties
ActivityName ConfigName CurrentHeaderId DebugId
EffectiveBegin EffectiveEnd ErrorMsg IsError
Reason ReturnValue RuleName RuleSet
SessionId TimeExecuted

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %BuildIndicesAsync
%BuildIndicesAsyncResponse %CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion
%ClassName %ComposeOid %ConstructClone %Delete
%DeleteExtent %DeleteId %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Exists %ExistsId %Extends
%GUID %GUIDSet %GetLock %GetParameter
%GetSwizzleObject %Id %InsertBatch %IsA
%IsModified %IsNull %KillExtent %KillExtentData
%LoadFromMemory %LockExtent %LockId %New
%NormalizeObject %ObjectIsNull %ObjectModified %Oid
%OnBeforeAddToSync %OnDetermineClass %Open %OpenId
%OriginalNamespace %PackageName %PhysicalAddress %PurgeIndices
%Reload %RemoveFromSaveSet %ResolveConcurrencyConflict %RollBack
%Save %SaveDirect %SaveIndices %SerializeObject
%SetModified %SortBegin %SortEnd %SyncObjectIn
%SyncTransport %UnlockExtent %UnlockId %ValidateIndices
%ValidateObject Log Purge PurgeBitmaps
XMLDTD XMLExport XMLExportToStream XMLExportToString
XMLNew XMLSchema XMLSchemaNamespace XMLSchemaType


Parameters


• parameter XMLIGNORENULL = 1;
Ensure that we don't get $C(0) for values that are empty strings

Properties


• property ActivityName as %String(MAXLEN=128,TRUNCATE=1,XMLNAME="activityName",XMLPROJECTION="attribute");
(Optional) The name of the BPL rule activity that invoked the rule.
• property ConfigName as %String(MAXLEN=128,TRUNCATE=1);
Configured name of the InterSystems IRIS host from which the rule was logged.
• property CurrentHeaderId as %String(MAXLEN=128,TRUNCATE=1);
Current message header id rule was logged.
• property DebugId as %Integer;
• property EffectiveBegin as %String(COLLATION="EXACT",MAXLEN=2000,XMLNAME="effectiveBegin",XMLPROJECTION="attribute");
The effectiveBegin of the ruleSet executed.
• property EffectiveEnd as %String(COLLATION="EXACT",MAXLEN=2000,XMLNAME="effectiveEnd",XMLPROJECTION="attribute");
The effectiveEnd of the ruleSet executed.
• property ErrorMsg as %String(MAXLEN=1024,TRUNCATE=1,XMLNAME="errorMsg",XMLPROJECTION="attribute");
If the Rules Engine returns an error it is placed here.
• property IsError as %Boolean [ InitialExpression = 0 ];
True if this is an error.
• property Reason as %String(MAXLEN=2000,TRUNCATE=1,XMLNAME="reason",XMLPROJECTION="attribute");
The reason (e.g, rule name) that the Rules Engine performed its action.
• property ReturnValue as %String(MAXLEN="",XMLNAME="returnValue",XMLPROJECTION="attribute");
The value returned by the Rule Engine for this rule.
• property RuleName as %String(MAXLEN=128,TRUNCATE=1,XMLNAME="ruleName",XMLPROJECTION="attribute") [ Required ];
The name of the Rule Definition that was executed.
• property RuleSet as %String(MAXLEN=128,TRUNCATE=1,XMLNAME="ruleSet",XMLPROJECTION="attribute");
The name of the ruleSet that was executed.
• property SessionId as %Integer(XMLNAME="sessionId",XMLPROJECTION="attribute");
The id for the session in which the Rule was fired.
• property TimeExecuted as Ens.DataType.UTC(XMLNAME="timeExecuted",XMLPROJECTION="attribute") [ InitialExpression = ##class(Ens.DataType.UTC).Normalize($$$timeUTC),Required ];
Time that this Rule was executed.

Methods


• classmethod Log(pSessionId As %Integer, pRuleName As %String, pRuleSet As %String, pEffectiveBegin As %String, pEffectiveEnd As %String, pActivityName As %String, pReason As %String, pReturnValue As %String, pErrorMsg As %String, pIsError As %Boolean, pDebugId As %Integer = "") as %Status
• classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pDummy As %Boolean, pBitmapChunkLimit As %Integer = 500) as %Status

Queries


• query Enumerate()
SQL Query :
SELECT %ID,
SessionId,
TimeExecuted,
ActivityName,
RuleName,
RuleSet,
EffectiveBegin,
EffectiveEnd,
Reason,
ReturnValue,
IsError,
ErrorMsg,
DebugId,
ConfigName,
CurrentHeaderId
FROM Ens_Rule.Log
ORDER BY %ID ASC
Returns the current contents of the Rule Audit Log.

Indices


•index (ConfigName on ConfigName) [Type = bitmap];
•index (RuleName on RuleName) [Type = bitmap];
•index (SessionId on SessionId);
•index (TimeExecuted on TimeExecuted);

Triggers


•trigger OnDelete (BEFORE event DELETE)