How to configure REFramework to Send Email on System Exception only if Not/Done Retrying Queue Item?

I am using the REFramework but I want to configure it to send email when a System Exception is encountered - but only if it’s done retrying (or not retrying at all) which is based on the configuration of the queue.

For example:

  1. Get Next Item from Queue - Transaction T1
  2. Transaction T1 encounters a System Exception
  3. Queue item Transaction T1 is marked as retried and a new (same) queue item is created to process later as the queue is configured to retry 2 times
  4. Repeat steps 1-3 until it gets to the queue item is actually a retry of Transaction T1
  5. After the 2nd retry and stills encounters a System Exception, this is when I want to send email. Not when it will still do a retry

Now how do I incorporate that logic within the REFramework? Thanks!

Hi @ronang

Please try adding inside the Finally block of the Finally block of Process Transaction. I have added a comment indicating to invoke the workflow SendMail when System Error IsNot Nothing And RetryNumber greater than 1

Note: I am assuming you are using the standard REFramework.

Hi @ronang,

i have built that in one of my processes too. Problem was that no one got informed when the last queue retry failed again.

I placed it in the system exception catch for Process Transaction State in ReFramework.

Thanks GreenTea! This could potentially work but the “RetryNumber greater than 1” condition should be more like “RetryNumber greater than whatever the max retry configuration of the queue” which makes sense to put in Config.

Agree. I thought so too the solution would look like this. However, I was hoping for a way not needing to rely on the Config’s QueueMaxRetries is equal to Queue Max # of Retries setting of the Queue. Anyway, looks like this is the way to go. Thanks!

I think one more possibility is to get the max queue retry via Orchestrator API. The endpoint
​/odata​/QueueDefinitions should give back the necessary information directly from orchestrator queue.

image

1 Like

Hi @ronang

As per @schwarzp advice, please click here to extract the MaxNumberOfRetries from each Orchestrator Queue



4 Likes

This is perfect! Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.