Class Reference
IRIS for UNIX 2019.2
InterSystems: The power behind what matters   
Documentation  Search
  [ENSLIB] >  [Ens] >  [Rule] >  [Rule]
Private  Storage   

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

Defines a Business Rule within a Rule set.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
1 7 4 1


Summary

Properties
Actions Conditions Disabled ReturnValue RuleNo
RuleSet SubRules

Methods
%AddToSaveSet %AddToSyncSet %BMEBuilt %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
Evaluate 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 Action(XMLNAME="action",XMLPROJECTION="ELEMENT") [ Inverse = Rule,Cardinality = children ];
Collection of optional actions associated with this Rule.
• relationship Conditions as Condition(XMLNAME="condition",XMLPROJECTION="ELEMENT") [ Inverse = Rule,Cardinality = children ];
Collection of conditions that define this Rule.
• property Disabled as %Boolean(XMLNAME="disabled",XMLPROJECTION="ATTRIBUTE");
If false, then this rule is enabled; otherwise this rule is not evaluated.
• property ReturnValue as %String(MAXLEN=128,XMLNAME="return",XMLPROJECTION="ATTRIBUTE");
If defined, value returned if this Rule is true.
• property RuleNo as %Integer(XMLPROJECTION="NONE") [ InitialExpression = $I(^Ens.Rule.RuleC("RuleNo")) ];
• relationship RuleSet as Ens.Rule.RuleSet [ Inverse = Rules,Cardinality = parent ];
Parent RuleSet.
• property SubRules as list of SubRule(XMLNAME="rule",XMLPROJECTION="ELEMENT");
Collection of SubRules of this Rule.

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 Evaluate(pRuleSet As RuleDefinition, pRuleNo As %Integer, pContext As %RegisteredObject, Output pValue As %Boolean, Output pErrorMsg As %String) as %Status
Evaluate this Rule.
Returns user errors via pErrorMsg.
• method GenerateCode(pCompiler As Compiler, pRuleNo As %Integer) as %Status
Generate code for this Rule.
pRuleNo gives the ordinal position of this Rule within the Rule Set.

Indices

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


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.