Skip to main content


persistent class Ens.MessageHeader extends %Library.Persistent, Ens.MessageHeaderBase, %XML.Adaptor

SQL Table Name: Ens.MessageHeader

Property Inventory

Method Inventory


parameter EXTENTSIZE = 20000000;
Inherited description: The EXTENTSIZE parameter is used to inform the SQL Query Optimizer of the approximate number of instances in the extent containing instances of this class.

For example, a class that expects to have about 1,000,000 instances should define:

parameter EXTENTSIZE = 1000000;


property Banked as %Integer (XMLPROJECTION = "NONE") [ Calculated , Transient , ReadOnly ];
Have this header and its MessageBody and SearchTable been archived to the Enterprise Message Bank already? Header=1, Body=2, SearchTable=4, all=7
Property methods: BankedCompute(), BankedDisplayToLogical(), BankedIsValid(), BankedLogicalToDisplay(), BankedNormalize(), BankedSQLCompute(), BankedXSDToLogical()


method BankedGet() as %Integer
method MessageId() as %String
The same as %Id(), but works even if the object hasn't been saved already
method NewErrorResponse(Output pHeader As Ens.MessageHeader, pStatus As %Status) as %Status
creates an error message response header from a request message header
classmethod NewRequestMessage(ByRef pHeader As Ens.MessageHeader, pMessageBody As %Library.Persistent, ByRef pSessionId As %String, ByRef pSuperSession As %String) as %Status
Create a new request header
method NewResponseMessage(Output pHeader As Ens.MessageHeader, pMessageBody As %Library.Persistent, pSuperSession As %String = "") as %Status
Create a response message header from a request message header
classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pKeepIntegrity As %Boolean = 1, pBodiesToo As %Boolean = 0, pBitmapChunkLimit As %Integer = 500) as %Status
Replacement multi threaded capable method available in Ens.Util.MessagePurge
classmethod PurgeSetTemp(pType As %Integer, pMsg As %String, pSC As %Status, pSC2 As %Status) as %Status
Deprecated. No longer used by InterSystems Code. Replaced by ReportPurgeError Log a warning in the Event Log; add to tSC status; set error/warning in a temp global as below:
Total error count is in subscript 0.
Errors while deleting message headers are in subscript 1.
Errors while deleting message bodies are in subscript 2.
Errors while deleting search table entries are in subscript 3.
classmethod ResendDuplicatedMessage(pOriginalHeaderId As %String, Output pNewHeaderId As %String, pNewTarget As %String, pNewBody As %RegisteredObject, pNewSource As %String, pHeadOfQueue As %Boolean) as %Status
Resend the message header identified by pOriginalHeaderId by constructing a copy of it and submitting the copy to its target queue. Optional arguments pNewTarget, pNewBody and pNewSource specify replacement values for key header properties. The Description property is updated with an annotation giving the original header ID. Finally the boolean pHeadOfQueue argument specifies whether the new header should be submitted at the end of the target queue or at the head of the line.
classmethod ResubmitMessage(pHeaderId As %String, pNewTarget As %String, pNewBody As %RegisteredObject, pHeadOfQueue As %Boolean) as %Status
Resubmit the message header identified by pHeaderId to its target queue. Optional arguments pNewTarget and pNewBody specify replacement values for key header properties. If these are given, the Description property is updated with annotations giving the previous values. Finally the boolean pHeadOfQueue argument specifies whether the header should be resubmitted at the end of the target queue or at the head of the line.
method SetStatus(pStatus As Ens.DataType.MessageStatus)
set and immediately save the status field of this object
method needsReply() as %Boolean


index (Extent on ) [Extent, Type = bitmap];
Index methods: ExtentClose(), ExtentExecute(), ExtentFetch(), ExtentFetchRows(), ExtentFunc(), ExtentGetInfo(), ExtentGetODBCInfo(), ExtentPrepare(), ExtentSendODBC()
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (MessageBodyClassName on MessageBodyClassName) [Type = bitmap];
Index methods: MessageBodyClassNameDisplayToLogical(), MessageBodyClassNameGet(), MessageBodyClassNameGetStored(), MessageBodyClassNameIsValid(), MessageBodyClassNameLogicalToDisplay(), MessageBodyClassNameLogicalToOdbc(), MessageBodyClassNameNormalize(), MessageBodyClassNameSet()
index (MessageBodyId on MessageBodyId);
Index methods: MessageBodyIdDisplayToLogical(), MessageBodyIdExists(), MessageBodyIdGet(), MessageBodyIdGetStored(), MessageBodyIdIsValid(), MessageBodyIdLogicalToDisplay(), MessageBodyIdLogicalToOdbc(), MessageBodyIdNormalize(), MessageBodyIdSet()
index (SessionId on SessionId);
Index methods: SessionIdDisplayToLogical(), SessionIdExists(), SessionIdGet(), SessionIdGetStored(), SessionIdIsValid(), SessionIdLogicalToDisplay(), SessionIdNormalize(), SessionIdSet(), SessionIdXSDToLogical()
index (SourceConfigName on SourceConfigName) [Type = bitmap];
Index methods: SourceConfigNameDisplayToLogical(), SourceConfigNameGet(), SourceConfigNameGetStored(), SourceConfigNameIsValid(), SourceConfigNameLogicalToDisplay(), SourceConfigNameLogicalToOdbc(), SourceConfigNameNormalize(), SourceConfigNameSet()
index (Status on Status) [Type = bitmap];
Index methods: StatusDisplayToLogical(), StatusGet(), StatusGetStored(), StatusIsValid(), StatusLogicalToDisplay(), StatusNormalize(), StatusSet(), StatusXSDToLogical()
index (TargetConfigName on TargetConfigName) [Type = bitmap];
Index methods: TargetConfigNameDisplayToLogical(), TargetConfigNameGet(), TargetConfigNameGetStored(), TargetConfigNameIsValid(), TargetConfigNameLogicalToDisplay(), TargetConfigNameLogicalToOdbc(), TargetConfigNameNormalize(), TargetConfigNameSet()
index (TimeCreated on TimeCreated);
Index methods: TimeCreatedDisplayToLogical(), TimeCreatedExists(), TimeCreatedGet(), TimeCreatedGetStored(), TimeCreatedIsValid(), TimeCreatedLogicalToDisplay(), TimeCreatedLogicalToOdbc(), TimeCreatedNormalize(), TimeCreatedOdbcToLogical(), TimeCreatedSet(), TimeCreatedStorageToLogical(), TimeCreatedtimeCmp(), TimeCreatedtimeDiff(), TimeCreatedtimeLocal(), TimeCreatedtimeLocaltoUTC(), TimeCreatedtimeUTC(), TimeCreatedtimeUTCH(), TimeCreatedtimeUTCHtoUTC(), TimeCreatedtimeUTCtoLocal(), TimeCreatedtimeUTCtoUTCH()


trigger OnDelete (BEFORE event DELETE);

Inherited Members

Inherited Properties

Inherited Methods


Storage Model: Storage (Ens.MessageHeader)

FeedbackOpens in a new tab