Skip to main content


persistent class Ens.Rule.SubRule extends %Library.Persistent, %XML.Adaptor

SQL Table Name: Ens_Rule.SubRule

Defines a SubRule of a Business Rule or another SubRule within a Rule Set. SubRules do not share the storage with Rules and there is no parent-child relationship with RuleSet. SubRules are not independently evaluated neither they generate separate code.

Property Inventory

Method Inventory


parameter XMLIGNORENULL = 1;
Ensure that we don't get $C(0) for values that are empty strings


relationship Actions as array of SubAction (XMLNAME = "action", XMLPROJECTION = "ELEMENT") [ InitialExpression = $listbuild("Ens.Rule.SubAction","SubRule",+$this,"children",1,1) , Transient , Inverse = SubRule , Cardinality = children ];
Collection of optional actions associated with this SubRule.
Property methods: ActionsGet(), ActionsGetObject(), ActionsGetObjectId(), ActionsGetSwizzled(), ActionsIsEmpty(), ActionsIsValid(), ActionsNewObject(), ActionsRClose(), ActionsRExec(), ActionsRFetch(), ActionsRelate(), ActionsSQLCompute(), ActionsSet(), ActionsUnRelate()
relationship Conditions as array of SubCondition (XMLNAME = "condition", XMLPROJECTION = "ELEMENT") [ InitialExpression = $listbuild("Ens.Rule.SubCondition","SubRule",+$this,"children",1,1) , Transient , Inverse = SubRule , Cardinality = children ];
Collection of conditions that define this SubRule.
Property methods: ConditionsGet(), ConditionsGetObject(), ConditionsGetObjectId(), ConditionsGetSwizzled(), ConditionsIsEmpty(), ConditionsIsValid(), ConditionsNewObject(), ConditionsRClose(), ConditionsRExec(), ConditionsRFetch(), ConditionsRelate(), ConditionsSQLCompute(), ConditionsSet(), ConditionsUnRelate()
property Disabled as %Boolean (XMLNAME = "disabled", XMLPROJECTION = "ATTRIBUTE");
If false, then this SubRule is enabled; otherwise this SubRule is not evaluated.
Property methods: DisabledDisplayToLogical(), DisabledGet(), DisabledGetStored(), DisabledIsValid(), DisabledLogicalToDisplay(), DisabledLogicalToXSD(), DisabledNormalize(), DisabledSet(), DisabledXSDToLogical()
property ReturnValue as %String (MAXLEN = 128, XMLNAME = "return", XMLPROJECTION = "ATTRIBUTE");
If defined, value returned if this SubRule is true.
Property methods: ReturnValueDisplayToLogical(), ReturnValueGet(), ReturnValueGetStored(), ReturnValueIsValid(), ReturnValueLogicalToDisplay(), ReturnValueLogicalToOdbc(), ReturnValueNormalize(), ReturnValueSet()
property RuleNo as %Integer (XMLPROJECTION = "NONE") [ InitialExpression = $I(^Ens.Rule.RuleC("RuleNo")) , Required ];
Property methods: RuleNoDisplayToLogical(), RuleNoGet(), RuleNoGetStored(), RuleNoIsValid(), RuleNoLogicalToDisplay(), RuleNoNormalize(), RuleNoSet(), RuleNoXSDToLogical()
property SubRules as list of SubRule (XMLNAME = "rule", XMLPROJECTION = "ELEMENT");
Collection of SubRules of this SubRule.
Property methods: SubRulesBuildValueArray(), SubRulesCollectionToDisplay(), SubRulesCollectionToOdbc(), SubRulesDisplayToCollection(), SubRulesGet(), SubRulesGetObject(), SubRulesGetObjectId(), SubRulesGetStored(), SubRulesGetSwizzled(), SubRulesIsValid(), SubRulesOdbcToCollection(), SubRulesSet(), SubRulesSetObject(), SubRulesSetObjectId()


classmethod %OnDelete(oid As %ObjectIdentity) as %Status
This callback method is invoked by the %Delete() method to provide notification that the object specified by oid is being deleted.

If this method returns an error then the object will not be deleted.

method GenerateCode(pCompiler As Compiler, pRuleNo As %Integer) as %Status
Generate code for this SubRule.
pRuleNo gives the ordinal position of this SubRule within the Rule Set.


index (ID on RuleNo) [IdKey, Type = key];
Make sure SubRules are ordered correctly
Index methods: IDCheck(), IDDelete(), IDExists(), IDOpen(), IDSQLCheckUnique(), IDSQLExists(), IDSQLFindPKeyByConstraint(), IDSQLFindRowIDByConstraint()

Inherited Members

Inherited Methods


Storage Model: CacheStorage (Ens.Rule.SubRule)

FeedbackOpens in a new tab