This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > EnsLib.ITK.Framework.Process.ITKMessageRouter


persistent class EnsLib.ITK.Framework.Process.ITKMessageRouter extends Ens.BusinessProcess

SQL Table Name: EnsLib_ITK_Framework_Process.ITKMessageRouter

Performs ITK subscript, fault, queue collection and distribution envelope routing.

Property Inventory

Method Inventory


parameter SETTINGS = SendReponsesTo,BadMessageHandler,FaultVocabulary,FaultReporterURI;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names


property BadMessageHandler as %String (MAXLEN = 1000);
Configuration item to which to send bad messages
Property methods: BadMessageHandlerDisplayToLogical(), BadMessageHandlerGet(), BadMessageHandlerGetStored(), BadMessageHandlerIsValid(), BadMessageHandlerLogicalToDisplay(), BadMessageHandlerLogicalToOdbc(), BadMessageHandlerNormalize(), BadMessageHandlerSet()
property FaultReporterURI as %String;
The reportor uri to report any technical errors against
Property methods: FaultReporterURIDisplayToLogical(), FaultReporterURIGet(), FaultReporterURIGetStored(), FaultReporterURIIsValid(), FaultReporterURILogicalToDisplay(), FaultReporterURILogicalToOdbc(), FaultReporterURINormalize(), FaultReporterURISet()
property FaultVocabulary as %String;
Vocabulary to use for creating fault messages from this Service.
Property methods: FaultVocabularyDisplayToLogical(), FaultVocabularyGet(), FaultVocabularyGetStored(), FaultVocabularyIsValid(), FaultVocabularyLogicalToDisplay(), FaultVocabularyLogicalToOdbc(), FaultVocabularyNormalize(), FaultVocabularySet()
property SendReponsesTo as %String;
Configuration item to which to send responses
Property methods: SendReponsesToDisplayToLogical(), SendReponsesToGet(), SendReponsesToGetStored(), SendReponsesToIsValid(), SendReponsesToLogicalToDisplay(), SendReponsesToLogicalToOdbc(), SendReponsesToNormalize(), SendReponsesToSet()


method GetContentRoutes(pRequest As EnsLib.ITK.Framework.RequestData, service As EnsLib.ITK.Setup.ServiceDefinition) as %String
Call to find the routes based on the content of the message
method GetDistributionRoutes(pRequest As EnsLib.ITK.Framework.RequestData) as %String
Call to find the routes to distribute the message onto given the address list in the distribution rules.
classmethod GetSubscriptionRoutes(pSourceApp As %String, pService As %String) as %String
This method will process the Subscription Rules to determine a comma separate list of consumers to send onto
method OnError(request As %Library.Persistent, ByRef response As %Library.Persistent, callrequest As %Library.Persistent, pErrorStatus As %Status, pCompletionKey As %String) as %Status
This method is called when an error response is received Returning the same error will cause the BusinessProcess to set its status to error and close down Returning $$$OK from this method causes the BusinessProcess to recover from this error
classmethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
Ensemble Callback to work out which config items we connect to
method OnRequest(pRequest As Ens.Request, Output pResponse As Ens.Response) as %Status
Inherited description: Handle a 'Request'
method OnResponse(request As %Library.Persistent, ByRef response As %Library.Persistent, callrequest As %Library.Persistent, callresponse As %Library.Persistent, pCompletionKey As %String) as %Status
Handle a 'Response' by passing it to the 'SendResponsesTo' component. This is typically the DispatchResponse component
method ResolveMessageRelationships(pRequest As EnsLib.ITK.Framework.RequestData, Output pOriginalMessage As EnsLib.ITK.Framework.RequestData) as %Status
When handling an async response this tues the request back up and determines where we are going to send the response to (based on original request that had the replyTo address).
method RouteQueueCollection(pRequest As EnsLib.ITK.Framework.RequestData)
Route if a Queue Collection request
method RouteReply(pRequest As EnsLib.ITK.Framework.RequestData, pOriginalMessage As EnsLib.ITK.Framework.RequestData) as %Status
This method actually routes a reply to a request-response message by either sending the reply (pRequest) onto deferred handler or by sending the response asychronously back to the call
method RouteStandardMessage(pRequest As EnsLib.ITK.Framework.RequestData, service As EnsLib.ITK.Setup.ServiceDefinition)
Resolves the endpoints and passes the message onto each unique end point found
method SimulateResponse(pRequest As EnsLib.ITK.Framework.RequestData, pOriginalMessage As EnsLib.ITK.Framework.RequestData, sc As %Status)
Called to send a response back (usually an error!!)
method ValidateAddressing(pRequest As EnsLib.ITK.Framework.RequestData) as %Status
Ensures that there is a business operation under the given replyTo address If there is not this switchboard is not capable to routing the async reply!
method ValidateContent(pRequest As EnsLib.ITK.Framework.RequestData) as %Status
Called to validate the content, if content validation is turned on for the given sender. TODO: ITK 2.0, when validating may have distribution envelope wrapping given requestClass, need to handle!! (also should be virtual XML Doc!)

Inherited Members

Inherited Properties

Inherited Methods


Gray indicates storage defined by superclasses.

Storage Model: CacheStorage (Ens.BusinessProcess)


Storage Model: CacheStorage (Ens.BusinessProcess)


Storage Model: CacheStorage (Ens.BusinessProcess)


Storage Model: CacheStorage (Ens.BusinessProcess)


Storage Model: CacheStorage (EnsLib.ITK.Framework.Process.ITKMessageRouter)

FeedbackOpens in a new window