Skip to main content

Ens.Host

abstract class Ens.Host extends %Library.RegisteredObject

Common base class for all Ensemble config item instances

Property Inventory

Method Inventory

Parameters

parameter ADAPTER;
The type of adapter used to communicate with external systems
parameter INVOCATION = Queue;
2 modes: Queue, InProc
parameter SETTINGS = ThrottleDelay,AlertOnError:Alerting,InactivityTimeout:Alerting,BusinessPartner:Info:partnerSelector,AlertGroups:Alerting:selector?multiSelect=1&context={Ens.ContextSearch/ProductionAlertGroups?productionName=@productionId};
Users can specify these values in the Ensemble Configuration Editor

Properties

property %ConfigName as %String (MAXLEN = 128);
return the name of config item
Property methods: %ConfigNameDisplayToLogical(), %ConfigNameGet(), %ConfigNameIsValid(), %ConfigNameLogicalToDisplay(), %ConfigNameLogicalToOdbc(), %ConfigNameNormalize(), %ConfigNameSet()
property %ConfigQueueName as %String (MAXLEN = 128);
return the name of queue as returned by the config item
Property methods: %ConfigQueueNameDisplayToLogical(), %ConfigQueueNameGet(), %ConfigQueueNameIsValid(), %ConfigQueueNameLogicalToDisplay(), %ConfigQueueNameLogicalToOdbc(), %ConfigQueueNameNormalize(), %ConfigQueueNameSet()
property %LastActionTime as %String [ Transient ];
If doing keepalives, the time of the last return from MessageHeaderHandler() or OnKeepalive()
Property methods: %LastActionTimeDisplayToLogical(), %LastActionTimeGet(), %LastActionTimeIsValid(), %LastActionTimeLogicalToDisplay(), %LastActionTimeLogicalToOdbc(), %LastActionTimeNormalize(), %LastActionTimeSet()
property %LastHandledTime as %String [ Transient ];
If doing keepalives, the time of the last return from MessageHeaderHandler()
Property methods: %LastHandledTimeDisplayToLogical(), %LastHandledTimeGet(), %LastHandledTimeIsValid(), %LastHandledTimeLogicalToDisplay(), %LastHandledTimeLogicalToOdbc(), %LastHandledTimeNormalize(), %LastHandledTimeSet()
property %LastReportedError as %String [ Transient ];
Copy of the text of the last error we reported, so we can avoid alerting more than once
Property methods: %LastReportedErrorDisplayToLogical(), %LastReportedErrorGet(), %LastReportedErrorIsValid(), %LastReportedErrorLogicalToDisplay(), %LastReportedErrorLogicalToOdbc(), %LastReportedErrorNormalize(), %LastReportedErrorSet()
property %QuitTask as %Integer [ InitialExpression = 0 ];
Flag for returning an error that will exit the OnTask() loop and terminate the Job
Property methods: %QuitTaskDisplayToLogical(), %QuitTaskGet(), %QuitTaskIsValid(), %QuitTaskLogicalToDisplay(), %QuitTaskNormalize(), %QuitTaskSet()
property %SessionId as %Integer;
The session id of the current message being processed
Property methods: %SessionIdDisplayToLogical(), %SessionIdGet(), %SessionIdIsValid(), %SessionIdLogicalToDisplay(), %SessionIdNormalize(), %SessionIdSet()
property %SuperSession as %String (MAXLEN = 300);
The SuperSession id of the current message being processed
Property methods: %SuperSessionDisplayToLogical(), %SuperSessionGet(), %SuperSessionIsValid(), %SuperSessionLogicalToDisplay(), %SuperSessionLogicalToOdbc(), %SuperSessionNormalize()
property %WarnedLatest as %Boolean [ InitialExpression = 0 , Transient ];
Flag whether we have already warned about the class being recompiled
Property methods: %WarnedLatestDisplayToLogical(), %WarnedLatestGet(), %WarnedLatestIsValid(), %WarnedLatestLogicalToDisplay(), %WarnedLatestNormalize(), %WarnedLatestSet()
property %isShadow as %String [ Transient ];
Is this a real live instance or a shadow instance used just to hold config settings.
Property methods: %isShadowDisplayToLogical(), %isShadowGet(), %isShadowIsValid(), %isShadowLogicalToDisplay(), %isShadowLogicalToOdbc(), %isShadowNormalize(), %isShadowSet()
property Adapter as Ens.Adapter;
The adapter instance
Property methods: AdapterGet(), AdapterGetSwizzled(), AdapterIsValid(), AdapterNewObject(), AdapterSet()
property AlertGroups as %String (MAXLEN = 2500);
The Alert Groups to which this item belongs.
Property methods: AlertGroupsDisplayToLogical(), AlertGroupsGet(), AlertGroupsIsValid(), AlertGroupsLogicalToDisplay(), AlertGroupsLogicalToOdbc(), AlertGroupsNormalize(), AlertGroupsSet()
property AlertOnError as %Boolean [ InitialExpression = 0 ];
Send an Alert message whenever an error occurs here
Property methods: AlertOnErrorDisplayToLogical(), AlertOnErrorGet(), AlertOnErrorIsValid(), AlertOnErrorLogicalToDisplay(), AlertOnErrorNormalize(), AlertOnErrorSet()
property BusinessPartner as %String (MAXLEN = 128);
Name of a Business Partner Profile associated with this item
Property methods: BusinessPartnerDisplayToLogical(), BusinessPartnerGet(), BusinessPartnerIsValid(), BusinessPartnerLogicalToDisplay(), BusinessPartnerLogicalToOdbc(), BusinessPartnerNormalize(), BusinessPartnerSet()
property InactivityTimeout as %Numeric (MINVAL = 0) [ InitialExpression = 0 ];
Send an Alert message if this number of seconds elapses with no messages being processed by this item.
Note that this alert will be sent even if AlertOnError is False.
Zero means no alerts of this type will be sent.
Property methods: InactivityTimeoutDisplayToLogical(), InactivityTimeoutGet(), InactivityTimeoutIsValid(), InactivityTimeoutLogicalToDisplay(), InactivityTimeoutNormalize(), InactivityTimeoutSet()
property ThrottleDelay as %Numeric [ InitialExpression = 0 ];
Duration of forced idleness before processing the next message, in milliseconds
Property methods: ThrottleDelayDisplayToLogical(), ThrottleDelayGet(), ThrottleDelayIsValid(), ThrottleDelayLogicalToDisplay(), ThrottleDelayNormalize(), ThrottleDelaySet()

Methods

method %OnClose() as %Status
Inherited description: This callback method is invoked by the %Close() method to provide notification that the current object is being closed.

The return value of this method is ignored.

method %OnNew(pConfigName As %String) as %Status
initialize Business Host object
method %SuperSessionSet(Arg As %String) as %Status
This is to allow a process access to local variable storing Super Session. Similar to how a process has access to $$$JobSessionId.
classmethod AdapterName() as %String
method GenerateSuperSession(pMessageHeader As Ens.MessageHeader = $$$NULLOREF, Output pSC As %Status = $$$OK, pDelimiter As %String = "^") as %String
This method will generate a super session ID
method GetDeferredResponseToken(pMessageHeader As Ens.MessageHeader) as %String
method GetProductionSettingValue(pName As %String, Output pStatus As %Status) as %String
method GetProductionSettings(Output pSettings) as %Status
classmethod GetPropertyConnections(Output pArray As %String, pItem As Ens.Config.Item)
Helper method for OnGetConnections
classmethod GetShadowInstance(pConfigItemName As %String, Output pStatus As %Status) as Ens.Host
Get a "shadow" instance of the named ConfigItem, live if the Production is running; otherwise static but fully populated with all its Settings values. See method Ens.Director:ParseConfigName() for full syntax of the ConfigItem name specification string.
method OnGenerateSuperSession(pMessageHeader As Ens.MessageHeader = $$$NULLOREF, Output pSC As %Status = $$$OK, pDelimiter As %String) as %String
User call back to override creation of Super Session value.
Return a non empty string from this method to use as the Super Session ID.
Any code needs to ensure the length of the string returned is not more than the MAXLEN of %SuperSession
If Empty string is returned the system will create one in GenerateSuperSession.
pMessageHeader may be populated when this is called.
The default of pDelimiter passed in is a ^
classmethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
This method is called when Ensemble Portal is drawing the production diagram pArray contains the config names the scanner found. Users can remove or add new names
method OnInit() as %Status
This user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP()
method OnKeepalive(pAdapterStatus As %Status) as %Status
This method will be called within KeepaliveInterval of the last return from OnTask() or OnKeepalive(). It is called via the Adapter's OnKeepalive() method, which is called from the Host.OnTask() method; if there is no Adapter there is no keepalive call.
classmethod OnMonitor(pHostName As %String) as %Status
This user callback method is called by the Ensemble Monitor Service (Ens.MonitorService) immediately after it has checked on the status of this host class.
classmethod OnProductionStart(pConfigName As %String) as %Status
This user callback method is called when the system is being started
classmethod OnProductionStop(pConfigName As %String) as %Status
This user callback method is called when the system is being stopped
method OnTearDown() as %Status
This user callback method is called from %OnClose()
method QueueName() as %String
classmethod SendDeferredResponse(pDeferredResponseToken As %String, pResponse As %Library.Persistent) as %Status
method SendRequestSync(pTargetDispatchName As %String, pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent, pTimeout As %Numeric = -1, pDescription As %String = "") as %Status

Inherited Members

Inherited Methods

Subclasses

FeedbackOpens in a new tab