Ens.Rule.Definition
abstract class Ens.Rule.Definition
All business rule and routing rule classes are defined from this rule. A rule (definition) class may contain multiple rule sets, each of which has its own effective dates/times and may contain multiple rules and actions.Method Inventory
Methods
final classmethod EvaluateRules(pRuleName As %String, pSessionId As %String = "", pContext As %RegisteredObject, pActivityName As %String = "", Output pReturnValue As %String, Output pReason As %String, pLogLevel As %String = $$$eRuleLogTypeReturn) as %Status
Evaluate the ruleDefinition.
This method will correctly resolve pRuleName to a class name if it is a rule alias.
pLogLevel is a set of character flags that control the logging performed during rule execution. To ensure that your value is correct, call NormalizeRuleLogTypes()() to produce a normalized set of flags for use by this method.
The following flags are available:
This method will correctly resolve pRuleName to a class name if it is a rule alias.
pLogLevel is a set of character flags that control the logging performed during rule execution. To ensure that your value is correct, call NormalizeRuleLogTypes()() to produce a normalized set of flags for use by this method.
The following flags are available:
- 'e' - log errors only. All errors will be logged irrespective of other flags, so setting the value to 'e' or leaving the value empty will only log errors.
- 'r' - log return values. This is the default value for the setting, and is also automatic whenever the 'd' or 'c' flags are specified.
- 'd' - log user-defined debug actions in the rule. The 'r' flag must also be specified for this flag to take effect.
- 'c' - log details of the conditions that are evaluated in the rule. The 'r' flag must also be specified for this flag to take effect.
This method normalizes user-defined rule logging flags in pRuleLogTypes into a
valid set of flags as expected by the EvaluateRules()() method in this class.
The following flags are available:
The following flags are available:
- 'e' - log errors only. All errors will be logged irrespective of other flags, so passing in 'e' or leaving the value empty return 'e'.
- 'r' - log return values. This flag is added automatically whenever one of the 'd' or 'c' flags is specified.
- 'd' - log user-defined debug actions in the rule. This will normalize to 'rd'.
- 'c' - log details of the conditions that are evaluated in the rule. This will normalize to 'rc'.
- 'a' - log all available information. This will normalize to 'rcd'.
classmethod evaluateRuleDefinition(pContext As %RegisteredObject, Output pRuleSet As %String, Output pEffectiveBegin As %String, Output pEffectiveEnd As %String, Output pReturnValue As %String, Output pReason As %String, pLogLevel As %String = $$$eRuleLogTypeReturn, pDebugId As %Integer = "") as %Status
This method is generated for the subclass
It contains the runtime code for all the ruleDefinition
pEffectiveTable is of the format: pEffectiveTable(index)= effectiveBegin_"$"_effectiveEnd_"$"_name
Subclasses
- Demo.ComplexMap.Rule.SemesterBatchRouting
- Demo.HL7.MsgRouter.ABCRoutingRule
- Demo.HL7.MsgRouter.AlertRule
- Demo.HL7.MsgRouter.XYZRoutingRule
- Demo.HL7v3.Rule.RouteAndTransform
- Demo.RecordMapBatch.Rule.BatchRoutingRule
- Demo.X12.SorterDTL.ByGroup.SimpleRule
- Demo.ZenService.Bproc.WeatherReport.LanguageFromLocation
- Demo.ZenService.Bproc.WeatherReport.TempScale