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

abstract class Ens.Rule.Utils

Utility methods used by the Rules editor and compiler.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
10


Summary

Methods
GetAllFunctions GetFunction GetFunctionSet GetPropertyList
GetPropertyTree


Methods

• classmethod GetAllFunctions(Output func) as %Status
Build a list of all defined utility functions, comprising InterSystems IRIS built-in functions plus user-defined custom functions, and return errors for the entire set of functions and specific errors for a given function. User-defined custom functions are class methods defined in subclasses of Ens.Rule.FunctionSet. The list is returned in array func() in the form:
func(Function) = $LB(Class,Method)
func(Function,"error") = optional error status indicating if this particular function has conflict errors
The method returns an error status containing all the errors for all functions. In case there are functions with the same name (case insensitive) defined in more than one user-defined function set class, an error will be reported for all the definitions of the function.
Note: This method is used by the Rule compiler to catch errors for given user-defined functions, and by the installer to report all errors in file ensinstall.log.
• classmethod GetFunction(pFuncName As %String, ByRef pSC As %Status) as %String
Returns a value for the named function of the form: $LB(class,name,specparsed).
• classmethod GetFunctionSet(Output funcset, pClass As %String) as %Status
Builds a list of functions (methods) for a given FunctionSet class and its subclasses. This list is returned in funcset. The list is of the form: list(NAME) = $LB(class,name,specparsed).
Note: This method is used by the Rule editor and DTL editor. Unlike method GetAllFunctions(), it builds the list from the compiled classes.
• classmethod GetPropertyList(ByRef list As %String, class As %String, documentClass As %String, maintainSequence As %Boolean = 0) as %Status
Returns a list of all the properties (and referenced properties) of class class in order.
The list is an array indexed by ordinal position. The value at each node is returned in the format:
list(n) = $LB(prop,type,classtype,collection,desc,sequenceNumber) If maintainSequence is true, then the values will be ordered by sequence number.
• classmethod GetPropertyTree(ByRef tree As %String, class As %String, documentClass As %String = "", level As %Integer = {$G(^Ens.Config("Rules", "MaxPropLevel"), 4)}, node As %String = "") as %Status
Return a tree containing a selected node or all the properties of class.
The tree is in the form:
tree(prop,subprop..)=$LB(type,classtype,collection,desc)
The selected node (if any) is addressed by a comma-separated list of descending ordinal positions. Use -1 to address the top-level node.


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