Skip to main content

Ens.Rule.Log

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

SQL Table Name: Ens_Rule.Log

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

Property Inventory

Method Inventory

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 methods: ActivityNameDisplayToLogical(), ActivityNameGet(), ActivityNameGetStored(), ActivityNameIsValid(), ActivityNameLogicalToDisplay(), ActivityNameLogicalToOdbc(), ActivityNameNormalize(), ActivityNameSet()
property ConfigName as %String (MAXLEN = 128, TRUNCATE = 1);
Configured name of the InterSystems IRIS host from which the rule was logged.
Property methods: ConfigNameDisplayToLogical(), ConfigNameGet(), ConfigNameGetStored(), ConfigNameIsValid(), ConfigNameLogicalToDisplay(), ConfigNameLogicalToOdbc(), ConfigNameNormalize(), ConfigNameSet()
property CurrentHeaderId as %String (MAXLEN = 128, TRUNCATE = 1);
Current message header id rule was logged.
Property methods: CurrentHeaderIdDisplayToLogical(), CurrentHeaderIdGet(), CurrentHeaderIdGetStored(), CurrentHeaderIdIsValid(), CurrentHeaderIdLogicalToDisplay(), CurrentHeaderIdLogicalToOdbc(), CurrentHeaderIdNormalize(), CurrentHeaderIdSet()
property DebugId as %Integer;
Property methods: DebugIdDisplayToLogical(), DebugIdGet(), DebugIdGetStored(), DebugIdIsValid(), DebugIdLogicalToDisplay(), DebugIdNormalize(), DebugIdSet(), DebugIdXSDToLogical()
property EffectiveBegin as %String (COLLATION = "EXACT", MAXLEN = 2000, XMLNAME = "effectiveBegin", XMLPROJECTION = "attribute");
The effectiveBegin of the ruleSet executed.
Property methods: EffectiveBeginDisplayToLogical(), EffectiveBeginGet(), EffectiveBeginGetStored(), EffectiveBeginIsValid(), EffectiveBeginLogicalToDisplay(), EffectiveBeginLogicalToOdbc(), EffectiveBeginNormalize(), EffectiveBeginSet()
property EffectiveEnd as %String (COLLATION = "EXACT", MAXLEN = 2000, XMLNAME = "effectiveEnd", XMLPROJECTION = "attribute");
The effectiveEnd of the ruleSet executed.
Property methods: EffectiveEndDisplayToLogical(), EffectiveEndGet(), EffectiveEndGetStored(), EffectiveEndIsValid(), EffectiveEndLogicalToDisplay(), EffectiveEndLogicalToOdbc(), EffectiveEndNormalize(), EffectiveEndSet()
property ErrorMsg as %String (MAXLEN = 1024, TRUNCATE = 1, XMLNAME = "errorMsg", XMLPROJECTION = "attribute");
If the Rules Engine returns an error it is placed here.
Property methods: ErrorMsgDisplayToLogical(), ErrorMsgGet(), ErrorMsgGetStored(), ErrorMsgIsValid(), ErrorMsgLogicalToDisplay(), ErrorMsgLogicalToOdbc(), ErrorMsgNormalize(), ErrorMsgSet()
property IsError as %Boolean [ InitialExpression = 0 ];
True if this is an error.
Property methods: IsErrorDisplayToLogical(), IsErrorGet(), IsErrorGetStored(), IsErrorIsValid(), IsErrorLogicalToDisplay(), IsErrorLogicalToXSD(), IsErrorNormalize(), IsErrorSet(), IsErrorXSDToLogical()
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 methods: ReasonDisplayToLogical(), ReasonGet(), ReasonGetStored(), ReasonIsValid(), ReasonLogicalToDisplay(), ReasonLogicalToOdbc(), ReasonNormalize(), ReasonSet()
property ReturnValue as %String);
The value returned by the Rule Engine for this rule.
Property methods: ReturnValueDisplayToLogical(), ReturnValueGet(), ReturnValueGetStored(), ReturnValueIsValid(), ReturnValueLogicalToDisplay(), ReturnValueLogicalToOdbc(), ReturnValueNormalize(), ReturnValueSet()
property RuleName as %String (MAXLEN = 128, TRUNCATE = 1, XMLNAME = "ruleName", XMLPROJECTION = "attribute") [ Required ];
The name of the Rule Definition that was executed.
Property methods: RuleNameDisplayToLogical(), RuleNameGet(), RuleNameGetStored(), RuleNameIsValid(), RuleNameLogicalToDisplay(), RuleNameLogicalToOdbc(), RuleNameNormalize(), RuleNameSet()
property RuleSet as %String (MAXLEN = 128, TRUNCATE = 1, XMLNAME = "ruleSet", XMLPROJECTION = "attribute");
The name of the ruleSet that was executed.
Property methods: RuleSetDisplayToLogical(), RuleSetGet(), RuleSetGetStored(), RuleSetIsValid(), RuleSetLogicalToDisplay(), RuleSetLogicalToOdbc(), RuleSetNormalize(), RuleSetSet()
property SessionId as %Integer (XMLNAME = "sessionId", XMLPROJECTION = "attribute");
The id for the session in which the Rule was fired.
Property methods: SessionIdDisplayToLogical(), SessionIdGet(), SessionIdGetStored(), SessionIdIsValid(), SessionIdLogicalToDisplay(), SessionIdNormalize(), SessionIdSet(), SessionIdXSDToLogical()
property TimeExecuted as Ens.DataType.UTC (XMLNAME = "timeExecuted", XMLPROJECTION = "attribute") [ InitialExpression = ##class(Ens.DataType.UTC).Normalize($$$timeUTC) , Required ];
Time that this Rule was executed.
Property methods: TimeExecutedDisplayToLogical(), TimeExecutedGet(), TimeExecutedGetStored(), TimeExecutedIsValid(), TimeExecutedLogicalToDisplay(), TimeExecutedLogicalToOdbc(), TimeExecutedNormalize(), TimeExecutedOdbcToLogical(), TimeExecutedSet(), TimeExecutedStorageToLogical(), TimeExecutedtimeCmp(), TimeExecutedtimeDiff(), TimeExecutedtimeLocal(), TimeExecutedtimeLocaltoUTC(), TimeExecutedtimeUTC(), TimeExecutedtimeUTCH(), TimeExecutedtimeUTCHtoUTC(), TimeExecutedtimeUTCtoLocal(), TimeExecutedtimeUTCtoUTCH()

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.

Indexes

index ($Log on ) [Extent, Type = bitmap];
index (ConfigName on ConfigName) [Type = bitmap];
Index methods: ConfigNameDisplayToLogical(), ConfigNameGet(), ConfigNameGetStored(), ConfigNameIsValid(), ConfigNameLogicalToDisplay(), ConfigNameLogicalToOdbc(), ConfigNameNormalize(), ConfigNameSet()
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (RuleName on RuleName) [Type = bitmap];
Index methods: RuleNameDisplayToLogical(), RuleNameGet(), RuleNameGetStored(), RuleNameIsValid(), RuleNameLogicalToDisplay(), RuleNameLogicalToOdbc(), RuleNameNormalize(), RuleNameSet()
index (SessionId on SessionId);
Index methods: SessionIdDisplayToLogical(), SessionIdExists(), SessionIdGet(), SessionIdGetStored(), SessionIdIsValid(), SessionIdLogicalToDisplay(), SessionIdNormalize(), SessionIdSet(), SessionIdXSDToLogical()
index (TimeExecuted on TimeExecuted);
Index methods: TimeExecutedDisplayToLogical(), TimeExecutedExists(), TimeExecutedGet(), TimeExecutedGetStored(), TimeExecutedIsValid(), TimeExecutedLogicalToDisplay(), TimeExecutedLogicalToOdbc(), TimeExecutedNormalize(), TimeExecutedOdbcToLogical(), TimeExecutedSet(), TimeExecutedStorageToLogical(), TimeExecutedtimeCmp(), TimeExecutedtimeDiff(), TimeExecutedtimeLocal(), TimeExecutedtimeLocaltoUTC(), TimeExecutedtimeUTC(), TimeExecutedtimeUTCH(), TimeExecutedtimeUTCHtoUTC(), TimeExecutedtimeUTCtoLocal(), TimeExecutedtimeUTCtoUTCH()

Triggers

trigger OnDelete (BEFORE event DELETE);

Inherited Members

Inherited Methods

Storage

Storage Model: Storage (Ens.Rule.Log)

^Ens.Rule.LogD(ID)
=
%%CLASSNAME
SessionId
TimeExecuted
RuleName
RuleSet
EffectiveBegin
EffectiveEnd
ActivityName
Reason
ReturnValue
ErrorMsg
IsError
DebugId
ConfigName
CurrentHeaderId
FeedbackOpens in a new tab