Response Processing

The response to the Messaging API message issued to a target application is always synchronous for an end of day query. By default, the response to the execute end of day message is synchronous. This section provides more information about synchronous and asynchronous responses further below.

The target application is required to indicate compliance with the end of day action by returning the Messaging API error code and error message settings in the response. Transaction Server uses the return code values in the response to determine if it can proceed with the end of day processing. A return code of zero (0) indicates that the end of day is to proceed. A non-zero return code indicates that the target application could not process the end of day successfully and that the Transaction Server should abort the end of day. An error message, which is used only if the error code is non-zero, is provided for the target application to return text indicating why the end of day could not be completed.

Synchronous

For synchronous requests, the Transaction Server expects a response to the message and sets the response required indicator in the JMS message. The jmsReplyTimeout parameter determines how long the Transaction Server waits for the response. If a response is not received, a timeout occurs. The timeout is processed as an end of day check error and the business day is not ended.

When execute end of day processing for a business day starts, and before any messages are issued, the state for the business day is set to complete in progress. Transaction Server sends each execute end of day message sequentially, waiting for a response before proceeding to the next message. When all of the messages are sent, and all responses are received, execute end of day processing completes. The business day status is changed to complete if execute end of day processing was successful and complete failed if it was not.

Asynchronous

For asynchronous requests, the Transaction Server does not wait for the response to each message.

When execute end of day processing for a business day starts, the state for the business day is set to complete in progress. Transaction Server sends all of the execute end of day messages at once. The execute end of day request completes immediately, and the business day is placed in the complete waiting state.

The business day remains in the complete waiting state until the Transaction Server receives either a response with a non-zero return code, or all of the responses. If an error was received, the business day status is changed to complete failed. If no errors were received, the business day status changes to the complete state after the last response arrives.

Note: The reply queue specified must be one that is configured in the Transaction Server listener profile. Specifying a reply queue that is not in the listener profile results in a business day that always remains in the complete waiting state.