Question
· Apr 10

Initiating a Method After a Timeout During Message Delivery

Hello everyone,

I'm currently working on a business operation that employs a retry mechanism with a FailureTimeout = -1. So, this BO attempts to resend the message at the end of a RetryInterval of n seconds (n is configurable).

What I would like to achieve is to set a timer that runs in parallel with the sending mechanism so that, If I don't receive a response within m seconds (also is configurable and m<=n) from the initial message send (with RetryCount = 1), an alert or something similar is triggered. The latter should initiate a second method to run concurrently with the first one (which is still attempting to send), allowing me to send a message to a business process to handle the situation. Then this BP will process the alert appropriately, such as sending an email or notification.

I've tried some solutions using the JOB command and the BO's Alerting settings (for ex., Queue Wait Alert), but I haven't been able to achieve the desired result. I'm not familiar with process parallelization in IRIS, so I was wondering if someone more experienced could point me in the right direction for this implementation.

Thank you

Product version: IRIS 2023.1
Discussion (4)3
Log in or sign up to continue

I also have a Business Operation that sometimes experiences failures. My Reply Code Actions setting is E=R, my Retry Interval is 60, my Failure Timeout is -1. When a message fails, it retries after 60 seconds. This Business Operation is called from a BPL.

Connect Timeout (5) and Response Timeout (30) are the default values.

We usually do not get timeout, but we sometimes receive 500 Internal Server Error. In this case I check the response in BPL and initiate a retry. 

Hi Pierto,

in class Ens.BusinessOperation (that your custom class is going to extend) you have the overrideable method OnFailureTimeout

/// Override this method to provide custom handling of retry / failure timeout.<p/>
/// Set ..Retry=1 to override normal error return and re-evaluate flag properties.<p/>
/// Return 0 to skip further (default) FailureTimeout processing, 1 to perform default processing.
Method OnFailureTimeout(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent, ByRef pSC As %Status) As %Boolean [ CodeMode = expression ]
{
1
}

You can override it to trigger the next action you need to perform.

I hope this helps,
Regards

Hi Stefano,

Thank you for your response. Unfortunately, as @Enrico Parisi mentioned, OnFailureTimeout() isn't working as expected.

Nevertheless,  I managed to solve this issue by using an existing table which logs information about messages sent from the BO, a Business Service and a Business Process to initiate a parallel process alongside my ongoing transmissions.