Ens.Config.Production

persistent class Ens.Config.Production extends %Library.Persistent, %XML.Adaptor

SQL Table Name: Ens_Config.Production

Property Inventory (Including Private)

Method Inventory (Including Private)

Parameters

parameter XMLIGNORENULL = 1;
Inherited description: XMLIGNORENULL allows the programmer to override the default XML handling of empty strings for properties of type %String. By default (XMLIGNORENULL = 0), empty strings in the XML input are stored as $c(0) and $c(0) is written to XML as an empty tag. A missing tag in the XML input is always stored as "" and "" is always output to XML as no tag.

If XMLIGNORENULL is set = 1, then both missing tags in the XML and empty strings are input as "", and both "" and $c(0) are output as empty tags (i.e. <tag></tag>).

If XMLIGNORENULL is set = "inputonly", then both missing tags in the XML and empty strings are input as "". Output of "" and $c(0) are for XMLIGNORENULL = 0: $c(0) is output as an empty tag (i.e. <tag></tag>) and "" is output as no tag.

If XMLIGNORENULL = "runtime" (runtime is not case sensitive), then the behavior of XMLIGNORENULL is determined by the format parameter of XMLExport, XMLImport and %XML.Reader.OpenFile. The default behavior for XMLIGNORENULL="runtime is the same as XMLIGNORENULL=0. Adding "ignorenull" to the format argument changes the behavior to that of XMLIGNORENULL=1. "ignorenull" shoud be separated by a comma from literal/encoded part of the format. Example values for format are "", ",ignorenull", "literal,ignorenull" and "encoded,ignorenull". Note that "inputonly" is equivalent to using ,ignorenull for XMLExport and not for %XML.Reader.
parameter XMLNAME = Production;
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 ActorPoolSize as %Integer (MAXVAL = 128, MINVAL = 0) [ InitialExpression = 1 ];
Actor pool size for the production. This is the number of jobs that will be shared by business processes not configured to use a private job pool.
Property methods: ActorPoolSizeDisplayToLogical(), ActorPoolSizeGet(), ActorPoolSizeGetStored(), ActorPoolSizeIsValid(), ActorPoolSizeLogicalToDisplay(), ActorPoolSizeNormalize(), ActorPoolSizeSet(), ActorPoolSizeXSDToLogical()
property Description as %String (MAXLEN = 500, TRUNCATE = 1);
Description of the production.
Property methods: DescriptionDisplayToLogical(), DescriptionGet(), DescriptionGetStored(), DescriptionIsValid(), DescriptionLogicalToDisplay(), DescriptionLogicalToOdbc(), DescriptionNormalize(), DescriptionSet()
property Items as list of Ens.Config.Item (XMLNAME = "Item", XMLPROJECTION = "ELEMENT");
Property methods: ItemsBuildValueArray(), ItemsCollectionToDisplay(), ItemsCollectionToOdbc(), ItemsDisplayToCollection(), ItemsGet(), ItemsGetObject(), ItemsGetObjectId(), ItemsGetStored(), ItemsGetSwizzled(), ItemsIsValid(), ItemsOdbcToCollection(), ItemsSet(), ItemsSetObject(), ItemsSetObjectId()
property LogGeneralTraceEvents as %Boolean (XMLPROJECTION = "ATTRIBUTE") [ InitialExpression = 0 ];
Log trace events that are not associated with any particular config item.
Property methods: LogGeneralTraceEventsDisplayToLogical(), LogGeneralTraceEventsGet(), LogGeneralTraceEventsGetStored(), LogGeneralTraceEventsIsValid(), LogGeneralTraceEventsLogicalToDisplay(), LogGeneralTraceEventsLogicalToXSD(), LogGeneralTraceEventsNormalize(), LogGeneralTraceEventsSet(), LogGeneralTraceEventsXSDToLogical()
property ModifiedSettings as list of Ens.Config.Setting (XMLPROJECTION = "NONE") [ Transient ];
Same format as Settings, You must call PopulateModifiedSettings() to populate this collection The collection contains the list of settings that are either defined in the production, or have default setting overrides.
Property methods: ModifiedSettingsBuildValueArray(), ModifiedSettingsCollectionToDisplay(), ModifiedSettingsCollectionToOdbc(), ModifiedSettingsDisplayToCollection(), ModifiedSettingsGet(), ModifiedSettingsGetObject(), ModifiedSettingsGetObjectId(), ModifiedSettingsGetSwizzled(), ModifiedSettingsIsValid(), ModifiedSettingsOdbcToCollection(), ModifiedSettingsSet(), ModifiedSettingsSetObject(), ModifiedSettingsSetObjectId()
property Name as %String (MAXLEN = 128, XMLPROJECTION = "ATTRIBUTE") [ Required ];
Property methods: NameDisplayToLogical(), NameGet(), NameGetStored(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSet()
property Settings as list of Ens.Config.Setting (XMLNAME = "Setting", XMLPROJECTION = "ELEMENT");
Production settings
Property methods: SettingsBuildValueArray(), SettingsCollectionToDisplay(), SettingsCollectionToOdbc(), SettingsDisplayToCollection(), SettingsGet(), SettingsGetObject(), SettingsGetObjectId(), SettingsGetStored(), SettingsGetSwizzled(), SettingsIsValid(), SettingsOdbcToCollection(), SettingsSet(), SettingsSetObject(), SettingsSetObjectId()
property SubProductions as list of Ens.Config.SubProduction (XMLNAME = "SubProduction", XMLPROJECTION = "ELEMENT");
Property SubProductions As list Of Ens.Config.Production(XMLNAME = "SubProduction", XMLPROJECTION = "ELEMENT", XMLREFERENCE = "id");
Property methods: SubProductionsBuildValueArray(), SubProductionsCollectionToDisplay(), SubProductionsCollectionToOdbc(), SubProductionsDisplayToCollection(), SubProductionsGet(), SubProductionsGetObject(), SubProductionsGetObjectId(), SubProductionsGetStored(), SubProductionsGetSwizzled(), SubProductionsIsValid(), SubProductionsOdbcToCollection(), SubProductionsSet(), SubProductionsSetObject(), SubProductionsSetObjectId()
property TestingEnabled as %Boolean (XMLPROJECTION = "ATTRIBUTE");
Enable testing infrastructure for the production.
Property methods: TestingEnabledDisplayToLogical(), TestingEnabledGet(), TestingEnabledGetStored(), TestingEnabledIsValid(), TestingEnabledLogicalToDisplay(), TestingEnabledLogicalToXSD(), TestingEnabledNormalize(), TestingEnabledSet(), TestingEnabledXSDToLogical()
property VirtualSettings as list of %String (XMLPROJECTION = "NONE") [ Transient ];
Contains the list of settings, value, value_type, default, default_type and other meta information Must call PopulateVirtualSettings() to populate this collection The format of value of each element is the following $lb(Target,Name,Value,ValueType,Default,DefaultType,Description,Type,MAXLEN,MINVAL,MAXVAL,VALUELIST,DISPLAYLIST,IsRequired)
Property methods: VirtualSettingsBuildValueArray(), VirtualSettingsCollectionToDisplay(), VirtualSettingsCollectionToOdbc(), VirtualSettingsDisplayToCollection(), VirtualSettingsDisplayToLogical(), VirtualSettingsGet(), VirtualSettingsGetObject(), VirtualSettingsGetObjectId(), VirtualSettingsGetSwizzled(), VirtualSettingsIsValid(), VirtualSettingsLogicalToDisplay(), VirtualSettingsLogicalToOdbc(), VirtualSettingsNormalize(), VirtualSettingsOdbcToCollection(), VirtualSettingsSet(), VirtualSettingsSetObject(), VirtualSettingsSetObjectId()

Methods

private method %OnAddToSaveSet(depth As %Integer = 3, insert As %Integer = 0, callcount As %Integer = 0) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked when the current object is added to the SaveSet, either because %Save() was invoked on this object or on an object that references this object. %OnAddToSaveSet can modify the current object. It can also add other objects to the current SaveSet by invoking %AddToSaveSet or remove objects by calling %RemoveFromSaveSet.

If this method returns an error status then %Save() will fail and the transaction will be rolled back.

private method %OnAfterSave(insert As %Boolean) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %Save() method to provide notification that the object is being saved. It is called after the object's data has been successfully written to disk.

insert will be set to 1 if this object is being saved for the first time.

If this method returns an error then the call to %Save() will fail.

classmethod %OnDelete(oid As %ObjectIdentity) as %Status [ Language = objectscript ]
Inherited description: 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 %OnNew(initvalue) as %Status [ Language = objectscript ]
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

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

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method ActorDebugSetting(pKeyword As %String) as %Boolean [ Language = objectscript ]
method Checksum() as %Integer [ Language = objectscript ]
Checksum used in updating production.
classmethod CreateDocumentHTML(ProductionClass As %String, IncludeIntro As %Boolean = 1, Output URL As %String, Output LogFileName As %String) as %Status [ Language = objectscript ]
Create a HTML document containing the production configuration details. The HTML document appears in InterSystems online documentation style and provide links into the online documentation set in DOCBOOK.
How to use: Invoke this method passing the production name ProductionClass and a flag IncludeIntro to include a terminology introduction chapter (default is true). The method returns a status code. It also returns as output parameters the URL to display the documentation in a browser and the LogFileName to be checked in case an error occurs (if an error status code is returned).
Example:
    Set status = ##class(Ens.Config.Production).CreateDocumentHTML("Demo.Loan.FindRateProduction",1,.URL,.ErrLog)
  
Once the documentation is created, it will be available to be viewed from the Productions page of the Management Portal, or by pointing a browser to the returned URL.
The document is built by applying a XSL transformation to create a document expressed as DocBook XML, then using the InterSystems' DocBook utilities to load the book.
The documentation may be removed by invoking RemoveDocumentHTML().
classmethod CreateDocumentPDF(ProductionClass As %String, IncludeIntro As %Boolean = 1, ByRef PDFFileName As %String, Output LogFileName As %String, PDFRenderer As %String, ByRef Params As %String) as %Status [ Language = objectscript ]
Create a PDF file containing the production configuration details. The generated PDF file allows customization of the cover page (logo image, company name and address) and of the colors used for the titles and links.
How to use: Invoke this method passing the production name ProductionClass, a flag IncludeIntro to include a terminology introduction chapter (default is true), the file name PDFFileName on the InterSystems IRIS server where the PDF output should be written to, and an optional array Params of customization parameters in case you wish to override the defaults.
The parameter PDFRenderer is deprecated and is ignored.
The built-in FOP renderer is used.
    Set status = ##class(Ens.Config.Production).CreateDocumentPDF("Demo.Loan.FindRateProduction",1,"C:\Temp\DemoFindRate.pdf",.ErrLog)
  
classmethod CreateStudioProject(pProductionName As %String = "", pProjectName As %String = "", Output pProject As %Studio.Project) as %Status [ Language = objectscript ]
Create and save a studio project that contains all the detectable elements of the named Production.
classmethod CreateStudioProjectFromConfigItem(pConfigItem As Ens.Config.Item, pProjectName As %String = "", Output pProject As %Studio.Project) as %Status [ Language = objectscript ]
Create and save a studio project that contains all the detectable elements related to the named config item
classmethod EnumerateAlertGroupsClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateAlertGroupsExecute(ByRef qHandle As %Binary, Production As %String) as %Status [ Language = objectscript ]
classmethod EnumerateAlertGroupsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateCategoriesClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateCategoriesExecute(ByRef qHandle As %Binary, Production As %String) as %Status [ Language = objectscript ]
classmethod EnumerateCategoriesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemNamesClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemNamesExecute(ByRef qHandle As %Binary, Production As %String = "", ClassName As %String = "") as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemNamesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemsClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemsExecute(ByRef qHandle As %Binary, Production As %String = "", ItemType As %Integer = "", PrimaryOnly As %Boolean = 1) as %Status [ Language = objectscript ]
classmethod EnumerateConfigItemsFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
method FindItemByConfigName(pConfigItemName As %String, Output pStatus As %Status = $$$OK, pForceSwizzle As %Boolean = 0) as Ens.Config.Item [ Language = objectscript ]
Locate the config item matching the given config name. It may be a simple name or a fully qualified one as described in ParseConfigName()
The third parameter pForceSwizzle is used to force the call of an internal api if production is running to ensure items swizzled
method FindSettingByName(pName As %String, pTarget As %String = "") as Setting [ Language = objectscript ]
Locate the first setting with a given name.
classmethod FindStudioProjectItems(pProductionName As %String = "", Output pProjectItems) as %Status [ Language = objectscript ]
method GetCallTargets(pItem As Ens.Config.Item, ByRef pArray) as %Status [ Language = objectscript ]
classmethod GetConnections(ByRef array As %String, rootclass As %String, item As Ens.Config.Item) [ Language = objectscript ]
For given business class, return an array of business classes it talks to (left to right)
classmethod GetRuntimePortsArray(ByRef pArray) as %Status [ Language = objectscript ]
Get an array of all ports in use by the running Production. Value = config id|code|agentInterface Code "o" = TCP Outbound (in listen mode), "i" = TCP Inbound, "L" = Agent Listener Relay port, "C" = Agent Connect Relay port
method GetStaticSettings(ByRef pList) as %Status [ Language = objectscript ]
Return a list of all the common static settings properties for the current Production
classmethod LoadFromClass(pClassName As %String) [ Language = objectscript ]
This method loads the production from the XData of a class
classmethod OpenItemByConfigName(pConfigItemName As %String, Output pStatus As %Status = $$$OK) as Ens.Config.Item [ Language = objectscript ]
Open the config item matching the given config name. It may be a simple name or a fully qualified one as described in ParseConfigName()
method PopulateModifiedSettings() as %Status [ Language = objectscript ]
Call this method to initialize the ModifiedSettings collection. The collection includes Settings defined in production as well as those ones with default setting overrides.
method PopulateVirtualSettings() as %Status [ Language = objectscript ]
Populate the VirtualSettings collection
classmethod ProductionStateToText(pState As %Integer = $$$eProductionStateUnknown, pLocalize As %Boolean = 1) as %String [ Language = objectscript ]
API to convert the numeric production status value in pState into the corresponding text string. By default, the string is localized, but if pLocalize is passed in as 0, the English string is returned irrespective of the user's current language settings.
classmethod ProductionStatusClose(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod ProductionStatusExecute(ByRef qHandle As %Binary) as %Status [ Language = objectscript ]
classmethod ProductionStatusFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status [ Language = objectscript ]
classmethod ProductionTextToState(pText As %String, pLanguage As %String = $$$SessionLanguage) as %Integer [ Language = objectscript ]
API to convert the text of a production status in pText into the corresponding state value, which serves as a partial inverse to ProductionStateToText()(). It only serves as a partial inverse as the status text can depend on the language settings at the time of the original conversion from a state integer to a status text. If the language is known, it can be supplied in pLanguage, otherwise it will default to the current language for the process.
classmethod RemoveDocumentHTML(ProductionClass As %String) as %Status [ Language = objectscript ]
Remove the HTML documentation for a given production in the current namespace. This method may be used in case you wish to remove the HTML documentation that was created for a given production.
method RemoveItem(target As Ens.Config.Item = $$$NULLOREF) [ Language = objectscript ]
Remove the given config item from the production
method SaveToClass(pItem As Ens.Config.Item = $$$NULLOREF) as %Status [ Language = objectscript ]
This method saves the production into the XData of the corresponding class
classmethod SetModified(pProduction As %String = "") as %Integer [ Language = objectscript ]
Wrapper method to ensure that we only increment the production modification counter when pProduction is currently running in this namespace.
method UpdateSettings(pArray) as %Status [ Language = objectscript ]
This method updates the Settings collection with the data from pArray Settings collection is cleared first, then the entries in pArray is used to update it. The format of pArray is of the following: pArray = total number of entries pArray(i) = $lb(Target, Name, Value)
classmethod addClass(class, pNewClasses, pExistingList) as %Status [ Language = objectscript ]
classmethod addSchema(pType, pName, ByRef pSchemas) [ Language = objectscript ]
classmethod createStudioProjectFromArray(Output pProject As %Studio.Project, pProjectItems As %String, pProjectName As %String = "", pDescription As %String = "") as %Status [ Language = objectscript ]
classmethod expandProjectArray(pProjectItems As %String, pExistingClasses As %String) as %Status [ Language = objectscript ]
classmethod expandProjectArrayAuxiliary(pProjectItems As %String, pExistingClasses As %String) as %Status [ Language = objectscript ]
expandProjectArrayAuxiliary merges all the classes in pProjectItems into pExistingClasses before starting it also updates pExistingClasses with all the new classes it added before exiting
classmethod findClassXDATATagAttributeValue(pClassname, pXDATAname, pTagname, pAttributename, pResults) as %Status [ Language = objectscript ]
classmethod findcall(defclass, line, method, argument) as %String [ Language = objectscript ]
classmethod getActionDelegateTransform(pAction As Ens.Rule.Model.action, pNewRules, pTransformations) as %Status [ Language = objectscript ]
classmethod getDTLSchemas(ByRef tTransforms, ByRef pSchemas) as %Status [ Language = objectscript ]
classmethod getDependentPredecessor(pClasses, pNewClasses, pExistingClasses) as %Status [ Language = objectscript ]
classmethod getItemSchema(pItem As Ens.Config.Item, ByRef pSchemas) as %Status [ Language = objectscript ]
classmethod getProjectArrayFromConfigItem(pConfigItem As Ens.Config.Item, Output pProjectItems) as %Status [ Language = objectscript ]
classmethod getProjectArrayFromProduction(pProduction As Ens.Config.Production, Output pProjectItems) as %Status [ Language = objectscript ]
classmethod getRoutingRuleDelegatesAndTransformations(pRules, pNewRules, pTransformations) as %Status [ Language = objectscript ]
classmethod scanmethod(defclass, class, method, array) [ Language = objectscript ]

Queries

query EnumerateAlertGroups(Production As %String)
Selects AlertGroup As %String
Returns an alphabetically sorted list of all non-blank Alert Groups that are used by host items in the identified production.
query EnumerateCategories(Production As %String)
Selects Category As %String
Returns an alphabetically sorted list of all non-blank category names that are used by host items in the identified production.
query EnumerateConfigItemNames(Production As %String = "", ClassName As %String = "")
Selects Production As %String, ConfigName As %String, ClassName As %String, Comment As %String, Enabled As %Boolean
Enumerate all configuration item names whose underlying class is a subclass of the class specified by ClassName, for the given Production. This is used, for example, to list all business metrics within a given production, to support the DeepSee widget finder. It is more lightweight and faster than EnumerateConfigItems, but returns less data. If the Production string is an empty string ("") list all config item names of a particular class for all productions.
query EnumerateConfigItems(Production As %String = "", ItemType As %Integer = "", PrimaryOnly As %Boolean = 1)
Selects ConfigName As %String, CommentOrClassName As %String, Enabled As %Boolean, BusinessType As %Integer, ClassName As %String, RequestClasses As %String, ResponseClasses As %String, Production As %String, ItemId As %Integer, SeqNum As %String, BusPartner As %String, Categories As %String, AlertGroups As %String
Enumerate all config items in the given Production. Passing ItemType restricts the results to only items of the given type, for example $$$eHostTypeService. Prefixing the type with a minus sign restricts the results to all except those of the given type, for example -$$$eHostTypeService. Passing PrimaryOnly=0 will return multiple items with the same name if any exist. Otherwise only the primary (i.e. enabled) item will be returned.
query Extent()
Selects ID As %Library.RawString
SQL Query:
SELECT ID FROM Ens_Config.Production
This is a system provided query that provides a result set containing every instance within this extent.
query ProductionStatus()
Selects Production As %String, Status As %String, LastStartTime As %String, LastStopTime As %String, StatusEnum As %String

Indices

index (indexName on Name) [IdKey, Type = key];
Index methods: indexNameCheck(), indexNameDelete(), indexNameExists(), indexNameOpen(), indexNameSQLCheckUnique(), indexNameSQLExists(), indexNameSQLFindPKeyByConstraint(), indexNameSQLFindRowIDByConstraint()

Triggers

trigger OnChange (AFTER event INSERT/UPDATE/DELETE);
Ensure we update the modified flag after SQL changes.
trigger OnDelete (BEFORE event DELETE);

Inherited Members

Inherited Methods (Including Private)

Storage

Storage Model: Storage (Ens.Config.Production)

^Ens.Config.ProductionD(ID)
=
%%CLASSNAME
ActorPoolSize
Description
Items
LogGeneralTraceEvents
TestingEnabled
Settings
SubProductions
Feedback