HUB Message Routing – Local Host, Report-Initiated
The figure above depicts message routing for an external Automatic Entry from a Report of application A (the client application) to an <<Ispec>> class in application B (the server application), where both applications reside on the same host. This process is detailed in the following subsections.
Message Initiation by the Client Application
The client application initiates an external Automatic Entry, as follows:
An external Automatic Entry from a Report in application A results in a call to the HUBSend procedure of HUBRouter, through the LINCSUPPORT library.
If the server application (application B) is not running, or is not registered (:HUB+ has not been set), an appropriate error message is returned.
If the server application (application B) is running and registered, the HUBSend procedure performs the following:
Allocates a response buffer to receive the response
Forwards the request using a COMS TP-to-TP send (via INPUTROUTER) to the input queue of a COMSTP program in the correct subsystem of the server application
The Client Report program then waits for a response to be returned by way of the buffer, or it waits for a user-defined timeout period (set in Glb.HubTimeOut) to expire.
Message Processing and Response Initiation by the Server Application
The server application COMSTP program processes the request.
When the server application has processed the transaction, the COMSTP program calls the HUBResponse procedure of HUBRouter, through the LINCSUPPORT library. The HUBResponse then copies the response directly into the correct Response Buffer, and causes an event that wakes up the Client Report.
Response Processing by the Client Application
The Client Report program that has been waiting for a response then wakes up and processes the response.