Ens.MessageHeader
persistent class Ens.MessageHeader extends %Library.Persistent, Ens.MessageHeaderBase, %XML.Adaptor
SQL Table Name: Ens.MessageHeader
Property Inventory
Method Inventory
- BankedGet()
- MessageId()
- NewErrorResponse()
- NewRequestMessage()
- NewResponseMessage()
- Purge()
- PurgeSetTemp()
- ResendDuplicatedMessage()
- ResendMessageBatch()
- ResendMessageBatchAsync()
- ResubmitMessage()
- SetStatus()
- needsReply()
Properties
property Banked as %Integer (XMLPROJECTION = "NONE") [ Calculated , Transient , ReadOnly ];
Enterprise Message Bank status of: this header, its MessageBody, possible SearchTable. Possible values: 0, 8 or #:#:DateTime where: 0 banking not requested 8 is banking requested #:#:DateTime is: First # indicates what has been banked: Sum of 8 and a combination of Header=1, Body=2, SearchTable=4 Second #: Last Message Header Status value DateTime: Last Message Header TimeProcessed value
Property methods: BankedCompute(), BankedDisplayToLogical(), BankedIsValid(), BankedLogicalToDisplay(), BankedNormalize(), BankedSQLCompute(), BankedXSDToLogical()
Methods
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, pBitmapPurgeRunLimit As %Integer = 600) 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.
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 ResendMessageBatch(ByRef filter As %String, resubmit As %Boolean = 0, headOfQueue As %Boolean = 0, Output resentCount As %Integer) as %Status [ SQLProc = MessageHeader_ResendMessageBatch ]
Projected as the stored procedure: MessageHeader_ResendMessageBatch
Resend / resubmit a batch of Request messages based on the provided conditions
in ascending order of MessageHeader ID.
Conditions are passed to the method as a multi-dimensional array filter. These following conditions are allowed: SourceConfigName, TargetConfigName, Status, StartId, EndId
The following condition is required: SourceConfigName
Set resubmit to 1 if you want to resubmit the messages (using the old message headers), instead of resending them (cloning the old message headers).
Set headOfQueue to 1 if you want to queue the messages at the head of the target queue(s). Before doing so, make sure the target queue(s) are temporarily disabled, and do not enable the queue(s) until this batch resend operation is complete, so the messages will not be processed out of order.
resentCount will be set to the number of messages resent / resubmitted.
Alternatively, if invoked as a SQL procedure, conditions need to be a JSON string instead.
Conditions are passed to the method as a multi-dimensional array filter. These following conditions are allowed: SourceConfigName, TargetConfigName, Status, StartId, EndId
The following condition is required: SourceConfigName
Set resubmit to 1 if you want to resubmit the messages (using the old message headers), instead of resending them (cloning the old message headers).
Set headOfQueue to 1 if you want to queue the messages at the head of the target queue(s). Before doing so, make sure the target queue(s) are temporarily disabled, and do not enable the queue(s) until this batch resend operation is complete, so the messages will not be processed out of order.
resentCount will be set to the number of messages resent / resubmitted.
Set filter("SourceConfigName") = "HttpService" Set filter("Status") = "Error" Set sc = ##class(Ens.MessageHeader).ResendMessageBatch(.filter, 0, 0, .count)
CALL Ens.MessageHeader_ResendMessageBatch('{"SourceConfigName":"HttpService"}', 0, 0)
classmethod ResendMessageBatchAsync(Output queueToken As %String, ByRef filter As %String, resubmit As %Boolean = 0, headOfQueue As %Boolean = 0) as %Status [ SQLProc = MessageHeader_ResendMessageBatchAsync ]
Projected as the stored procedure: MessageHeader_ResendMessageBatchAsync
Asynchronous version of ResendMessageBatch(),
with an additional first Output parameter of queueToken,
which is the Work Queue token for the asynchronous job.
Please refer to ResendMessageBatch() for details.
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
Indexes
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()
index (TimeProcessed on TimeProcessed);
Index methods: TimeProcessedDisplayToLogical(), TimeProcessedExists(), TimeProcessedGet(), TimeProcessedGetStored(), TimeProcessedIsValid(), TimeProcessedLogicalToDisplay(), TimeProcessedLogicalToOdbc(), TimeProcessedNormalize(), TimeProcessedOdbcToLogical(), TimeProcessedSet(), TimeProcessedStorageToLogical(), TimeProcessedtimeCmp(), TimeProcessedtimeDiff(), TimeProcessedtimeLocal(), TimeProcessedtimeLocaltoUTC(), TimeProcessedtimeUTC(), TimeProcessedtimeUTCH(), TimeProcessedtimeUTCHtoUTC(), TimeProcessedtimeUTCtoLocal(), TimeProcessedtimeUTCtoUTCH()
Triggers
trigger OnDelete (BEFORE event DELETE);
Inherited Members
Inherited Properties
- BusinessProcessId
- CorrespondingMessageId
- Description
- ErrorStatus
- Invocation
- IsError
- MessageBodyClassName
- MessageBodyId
- Priority
- Resent
- ReturnQueueName
- SessionId
- SourceBusinessType
- SourceConfigName
- Status
- SuperSession
- TargetBusinessType
- TargetConfigName
- TargetQueueName
- TimeCreated
- TimeProcessed
- Type
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %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()
- %InitExtentData()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- PurgeBitmaps()
- XMLDTD()
- XMLExport()
- XMLExportToStream()
- XMLExportToString()
- XMLNew()
- XMLSchema()
- XMLSchemaNamespace()
- XMLSchemaType()
Storage
Storage Model: Storage (Ens.MessageHeader)
^Ens.MessageHeaderD(ID) |
= | %%CLASSNAME
BusinessProcessId
Category
CorrespondingMessageId
ErrorStatus
Invocation
IsError
MessageBody
Priority
ReturnQueueName
SessionId
SourceConfigName
Status
TargetConfigName
TargetQueueName
TimeCreated
TimeProcessed
Type
MessageBodyId
SourceBusinessType
TargetBusinessType
MessageBodyClassName
Description
SuperSession
Resent
|