Prerequisites: A valid RuleSession
Namespaces: InRule.Runtime
Classes: RuleSessionSettings, RuleSession
References: InRule.Runtime.dll
These are some of the settings the rule engine uses during execution.
Overriding the current date
Gets or sets a value that will override return value of the Today() function in the rule engine. If not set, the rule engine will use the current date.
To override the current date to January 1, 2008:
ruleSession.Settings.Now = new DateTime(2008, 1, 1);
Overriding the execution timeout
Gets or sets the maximum time for rule engine execution.
To override the default setting to 60 seconds:
ruleSession.Settings.ExecutionTimeout = new TimeSpan(0, 0, 60);
Overriding the maximum cycle count
Gets or sets the maximum cycles for rule engine execution.
To override the default setting:
ruleSession.Settings.MaxCycleCount = 200000;
Returning detailed statistics information
Gets or sets a value determining whether statistics info will be logged and returned. The default is false.
Note: This will affect the amount of information that is displayed on the Performance Statistics report.
To override the default setting:
ruleSession.Settings.LogOptions = EngineLogOptions.SummaryStatistics;
To enable metrics logging
Set the MetricLogger property to an instance of an object that implements the IMetricLogger interface as shown below.
ruleSession.Settings.MetricLogger = new CsvMetricLogger();
For more details, refer to the CSV sample application.
Comments
0 comments
Please sign in to leave a comment.