Learning
Documentation
Community
Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / Ens.Rule.SubRule
Private  Storage   

Ens.Rule.SubRule


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

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.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 6 2 1


Summary


Properties
Actions Conditions Disabled ReturnValue RuleNo
SubRules

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %BuildIndicesAsync
%BuildIndicesAsyncResponse %CheckConstraints %CheckConstraintsForExtent %ClassIsLatestVersion
%ClassName %ComposeOid %ConstructClone %Delete
%DeleteExtent %DeleteId %DispatchClassMethod %DispatchGetModified
%DispatchGetProperty %DispatchMethod %DispatchSetModified %DispatchSetMultidimProperty
%DispatchSetProperty %Exists %ExistsId %Extends
%GUID %GUIDSet %GetLock %GetParameter
%GetSwizzleObject %Id %InsertBatch %IsA
%IsModified %IsNull %KillExtent %KillExtentData
%LoadFromMemory %LockExtent %LockId %New
%NormalizeObject %ObjectIsNull %ObjectModified %Oid
%OnBeforeAddToSync %OnDelete %OnDetermineClass %Open
%OpenId %OriginalNamespace %PackageName %PhysicalAddress
%PurgeIndices %Reload %RemoveFromSaveSet %ResolveConcurrencyConflict
%RollBack %Save %SaveDirect %SaveIndices
%SerializeObject %SetModified %SortBegin %SortEnd
%SyncObjectIn %SyncTransport %UnlockExtent %UnlockId
%ValidateIndices %ValidateObject GenerateCode XMLDTD
XMLExport XMLExportToStream XMLExportToString XMLNew
XMLSchema XMLSchemaNamespace XMLSchemaType


Parameters


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

Properties


• relationship Actions as SubAction(XMLNAME="action",XMLPROJECTION="ELEMENT") [ Inverse = SubRule,Cardinality = children ];
Collection of optional actions associated with this SubRule.
• relationship Conditions as SubCondition(XMLNAME="condition",XMLPROJECTION="ELEMENT") [ Inverse = SubRule,Cardinality = children ];
Collection of conditions that define this SubRule.
• property Disabled as %Boolean(XMLNAME="disabled",XMLPROJECTION="ATTRIBUTE");
If false, then this SubRule is enabled; otherwise this SubRule is not evaluated.
• property ReturnValue as %String(MAXLEN=128,XMLNAME="return",XMLPROJECTION="ATTRIBUTE");
If defined, value returned if this SubRule is true.
• property RuleNo as %Integer(XMLPROJECTION="NONE") [ InitialExpression = $I(^Ens.Rule.RuleC("RuleNo")) ];
• property SubRules as list of SubRule(XMLNAME="rule",XMLPROJECTION="ELEMENT");
Collection of SubRules of this SubRule.

Methods


• 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.

Indices


•index (ID on RuleNo) [IdKey];
Make sure SubRules are ordered correctly