InterSystems IRIS Data Platform 2020.4 > Class Reference > ENSLIB namespace > Ens.Rule.Router.RoutingRule

Ens.Rule.Router.RoutingRule

persistent class Ens.Rule.Router.RoutingRule extends Ens.Rule.RuleDefinition

SQL Table Name: Ens_Rule_Router.RoutingRule

Legacy: defined the interface for Ensemble Routing rules.
Persistent routing rules were implemented as subclasses of this class. Now the EvaluateRulesEx() method serves as a passthrough to the new (as of Ensemble 2012.1) class-defined routing rules and business rules. The rest of the contents of this class serve for conversion from old rule imports to the new style rule class definitions, which are derived from Ens.Rule.Definition. If a rule is fired, it sets %ReturnValue to a list of actions. This is a string of the form "type:target:transform,type:target:transform...".

Property Inventory

Method Inventory

Parameters

parameter COMPILABLE = 1;
Indicates if this Rule Engine supports compilation.
parameter RULEEDITORURL = UtilEnsRoutingRuleEditor.csp;
Inherited description: URL (csp page) for Rule Editor associated with the Rule Definition class.
parameter XMLNAME = routingRule;
Inherited description: This parameter provides the default XMLNAME for the class. If it is empty then the class name will be used to construct a default XML name. The default XMLNAME is used as the top level tag when exporting objects and the export context did not provide an XML container name.

Properties

property DoAll as %Boolean (XMLNAME = "doAll", XMLPROJECTION = "attribute") [ InitialExpression = 0 ];
Property methods: DoAllDisplayToLogical(), DoAllGet(), DoAllGetStored(), DoAllIsValid(), DoAllLogicalToDisplay(), DoAllLogicalToXSD(), DoAllNormalize(), DoAllSet(), DoAllXSDToLogical()
property DocCategory as %String (MAXLEN = 128, XMLNAME = "docCategory", XMLPROJECTION = "attribute");
Provides the default value for DocCategory for all rules within this RoutingRule set. (applies to virtual document messages only).
This is the document structure category name of a document structure name (DocType) For example in HL7 this is a schema version, e.g. "2.3.1".
Property methods: DocCategoryDisplayToLogical(), DocCategoryGet(), DocCategoryGetStored(), DocCategoryIsValid(), DocCategoryLogicalToDisplay(), DocCategoryLogicalToOdbc(), DocCategoryNormalize(), DocCategorySet()
property DocName as %String (MAXLEN = 2000, XMLNAME = "docName", XMLPROJECTION = "attribute");
Provides the default value for DocName for all rules within this RoutingRule set.
This is a comma-delimited list of document names (applies to virtual document messages only).
Each item in the list is tested against the document type name declared in the document.
Property methods: DocNameDisplayToLogical(), DocNameGet(), DocNameGetStored(), DocNameIsValid(), DocNameLogicalToDisplay(), DocNameLogicalToOdbc(), DocNameNormalize(), DocNameSet()
property DocType as %String (MAXLEN = 2000, XMLNAME = "docType", XMLPROJECTION = "attribute");
Provides the default value for DocType for all rules within this RoutingRule set.
This is a comma-delimited list of message types (applies to virtual document messages only).
It pertains to the structure definition assigned in the DocType property of the message.
Each item in the list is tested against the DocType structure property assigned in the document. Each item in the list can may include a category name, which would override the value provided by DocCategory.
Property methods: DocTypeDisplayToLogical(), DocTypeGet(), DocTypeGetStored(), DocTypeIsValid(), DocTypeLogicalToDisplay(), DocTypeLogicalToOdbc(), DocTypeNormalize(), DocTypeSet()
property MsgClass as %String (MAXLEN = 128, XMLNAME = "msgClass", XMLPROJECTION = "attribute");
Provides the default value for MsgClass for all rules within this RoutingRule set.
This is the name of the class used to contain the message.
Property methods: MsgClassDisplayToLogical(), MsgClassGet(), MsgClassGetStored(), MsgClassIsValid(), MsgClassLogicalToDisplay(), MsgClassLogicalToOdbc(), MsgClassNormalize(), MsgClassSet()
relationship Rules as array of Ens.Rule.Router.Rule (XMLNAME = "rule", XMLPROJECTION = "element") [ InitialExpression = $listbuild("Ens.Rule.Router.Rule","RuleSet",+$this,"children",1,1) , Transient , Inverse = RuleSet , Cardinality = children ];
Set of rules that make up the routing rule.
Property methods: RulesGet(), RulesGetObject(), RulesGetObjectId(), RulesGetSwizzled(), RulesIsEmpty(), RulesIsValid(), RulesNewObject(), RulesRClose(), RulesRExec(), RulesRFetch(), RulesRelate(), RulesSQLCompute(), RulesSet(), RulesUnRelate()
property Source as %String (MAXLEN = 128, XMLNAME = "source", XMLPROJECTION = "attribute");
Provides the default value for Source for all rules within this RoutingRule set.
This is the host name of the Business Service that sent this message to the Message Router.
Property methods: SourceDisplayToLogical(), SourceGet(), SourceGetStored(), SourceIsValid(), SourceLogicalToDisplay(), SourceLogicalToOdbc(), SourceNormalize(), SourceSet()

Methods

method Evaluate(pContext As %RegisteredObject) as %Status [ Language = objectscript ]
Evaluate this routing rule. The resulting return value is returned via the %ReturnValue property.
method GenerateCode(pCompiler As Ens.Rule.Compiler) as %Status [ Language = objectscript ]
Generate executable code for this Rule This also creates a routing global as a side effect.
classmethod GetTargetList(pHostClass As %String, pFullName As %String) as %String [ Language = objectscript ]
Returns a csv-list of target names that are referred to by the specified Routing Rule. This is used by the routing BP to calculate its connection list.

Inherited Members

Inherited Properties

Inherited Methods

Storage

Gray indicates storage defined by superclasses.

Storage Model: Storage (Ens.Rule.RuleDefinition)

^Ens.Rule.RuleDefinitionD(ID)
=
%%CLASSNAME
Description
HostClass
Name
TimeModified
Version
HasErrors
RoutineName
ContextClass
ReportGroup
ReportName
ShortDescription
Production

Storage Model: Storage (Ens.Rule.Router.RoutingRule)

^Ens.Rule.RuleDefinitionD(ID,"RoutingRule")
=
DocCategory
DocName
DocType
MsgClass
Source
DoAll
Feedback