Skip to main content

Ens.Helper.Service.SyncResponseHandler

abstract class Ens.Helper.Service.SyncResponseHandler

Base class for handling delayed responses for Synchronous Request

Property Inventory

Method Inventory

Properties

property OverrideClientResponseWaitTimeout as %Integer [ InitialExpression = 0 ];
Used to set expected response wait time for the client. If the client specifies the timeout then it will be used if the value of this is 0.
If the client is an IRIS Interoperabilty production SOAP operation the client response time will be included in the HTTP headers.
Property methods: OverrideClientResponseWaitTimeoutDisplayToLogical(), OverrideClientResponseWaitTimeoutGet(), OverrideClientResponseWaitTimeoutIsValid(), OverrideClientResponseWaitTimeoutLogicalToDisplay(), OverrideClientResponseWaitTimeoutNormalize(), OverrideClientResponseWaitTimeoutSet()
property SupportDelayedSyncRequest as %Boolean [ InitialExpression = 0 ];
If the client provides unique ClientRequestKey and then ClientRetryRequestKey then the SendRequestSync carried out by the service will attempt to prevent multiple processing of the same request if the client abandons requests before completion and retries the same request.
Delayed in this context is relative to the time the requestor will wait for a response before retrying.
Only one SendRequestSync in a service method is supported.
Property methods: SupportDelayedSyncRequestDisplayToLogical(), SupportDelayedSyncRequestGet(), SupportDelayedSyncRequestIsValid(), SupportDelayedSyncRequestLogicalToDisplay(), SupportDelayedSyncRequestNormalize(), SupportDelayedSyncRequestSet()
property UseSimulatedSync as %Boolean [ InitialExpression = 0 ];
Is this is set then the priority of the Synchronous request will be changed to Simulated Sync. This means the process might be quiesced for job stoppage/production shutdown prior to processing completion. Not applicable if target is invoked InProc. Reserved for future use.
Property methods: UseSimulatedSyncDisplayToLogical(), UseSimulatedSyncGet(), UseSimulatedSyncIsValid(), UseSimulatedSyncLogicalToDisplay(), UseSimulatedSyncNormalize(), UseSimulatedSyncSet()

Methods

method OnHandleNoResponseYet() as %Status
Subclass for the protocol This is called when detect the original request is still being processed and need to be able to handle caller not handling empty response
method OnPopulateSendSyncHandling(pTargetDispatchName As %String, pRequest As %Library.Persistent, pSyncCallTimeout As %Numeric = -1, pDescription As %String = "", ByRef pSendSyncHandling As %String) as %Status
Implement in protocol specific sub class to populate:
pSendSyncHandling("ClientRequestKey") pSendSyncHandling("ClientRetryRequestKey") pSendSyncHandling("ResponseWaitTimeoutToUse") Optional for future use: pSendSyncHandling("UseSimSync") - this has limited usage since the response from any requeued sim sync request is not used. Information/OnPopulateSendSyncHandling use only: pSendSyncHandling("ClientResponseTimeout") pSendSyncHandling("TransportMechanism")
method SendRequestSync(pTargetDispatchName As %String, pRequest As %Library.Persistent, ByRef pResponse As %Library.Persistent, pSyncCallTimeout As %Numeric = -1, pDescription As %String = "", ByRef pSendSyncHandling As %String) as %Status
This Overrides the core Ens.BusinessService SendRequestSync method
If SupportDelayedSyncRequest is false (the default) then there is no change in behaviour.
If SupportDelayedSyncRequest is true:
1. Look for Client request key. 2. Determine if Retry or new 3. Pass on normally or pass back delayed or hold until user disconnects/disappears
method SetReturnStatusCode(pStatusGenericReason As %String, pStatusText As %String = "", ByRef pResponse) as %Status
Subclass for the protocol specific handling of the return status. Note the Client may not receive and this can be by design since if the response is outstanding and still being processed we want to avoid returning to the caller of SendRequestSync an error as callers code flow cannot be known.
method VerifySendSyncHandlingInstructions(ByRef pSendSyncHandling As %String) as %Boolean
Verify SendSyncHandling instructions If ClientRequestKey or ClientRetryRequestKey are longer than 128 or empty strings then do not accept for SupportDelayedResponseForRequest

Subclasses

FeedbackOpens in a new tab