Rule Engine Execution Log

  • Updated

Execution Log

The Execution Log provides the ability to get different types of feedback from the rules engine depending on the needs of the application. The EngineLogOptions class governs what type of information will be collected during execution and made available through the SDK. For performance sake, the default setting will not capture any information, providing the fastest possible execution. Developers can then opt into the settings that they require. The available settings are listed below along with what each setting is used for.

Option

Description

None

Default. Disables InRule.Runtime.RuleExecutionLog messages, value changes, statistics and InRule.Runtime.Tracing.IExecutionTrace generation

Execution

Enables text feedback messages and rule changes on the InRule.Runtime.RuleExecutionLog. This includes RuleSet, Rule and Action execution messages.

StateChanges

Enables state changes on the InRule.Runtime.RuleExecutionLog, including calculations.

SummaryStatisics

Enables summary statistics in InRule.Runtime.RuleExecutionLog and InRule.Runtime.RuleSession. Required for summary level information for Performance Statistics report.

DetailStatistics

Enables detailed statistics in InRule.Runtime.RuleExecutionLog. This enables RuleSet, Rule and Action timings. Required for detail level information for Performance Statistics report.

RuleTrace

Enables InRule.Runtime.Tracing.IExecutionTrace generation. This is accessible from InRule.Runtime.RuleExecutionLog.GetExecutionTrace(). Note: While rule tracing is extremely useful for debugging rule execution, it degrades performance significantly and is not intended to be used in production environments.

RuleValues

Enables rule values to be captured so that they can be accessed using the SDK. Adding this flag increases memory consumption and reduces performance.

 

When this option is off, attempting to access certain rule values or execution counts for a child element from the SDK will result in an IntegrationException, which will be one of the following error codes:

  • SDKRuleValuesCanOnlyBeAccessedWhenStoringRuleValues
  • SDKRuleExecutionCountCanOnlyBeAccessedWhenStoringRuleValues

The EngineLogOptions is a flag enumeration, allowing multiple options to be specified for a single call as shown below:

ruleSession.Settings.LogOptions = EngineLogOptions.Execution | EngineLogOptions.Changes; 

Availability

The RuleExecutionLog is available as the return value from both the RuleSession.ApplyRules() and Entity.ExecuteRuleSet() methods. It is also available from the RuleSession.LastRuleExecutionLog property.

Please see the SDK help file section Retrieving and Processing the RuleExecutionLog for more details.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.