Question
American Express
IN
Last activity: 17 Nov 2020 22:01 EST
Getting notified for Broken Queue items
I have a standard agent configured in my application with maxattempts as 3. I want whenever 3 attempts are exhausted and item is moving to broken-queue then an email notification should be sent out with error details.
How can i achieve that?
Also second question is that whenever a queue item is moving to Broken queue......does pega logs anything is pega logs to identify the error why the item is moving to broken queue?
If you analyze the broken queue, you will find the property pyAttemp. Now, you can have a advance agent on that particular class. The advance agent will iterate through the queue class and if the attmept is 3 and pyItemstatus is Broken-Process, you can get the pyErrorMessage and then you can send the mail with that error message.
Point to note, all the broken process will be sent liek this, for the same queue item, you can get mail multiple times. To avaoid this, there are various ways and one such way is you can have a mail counter / mail flag on that queue item. Other effective way, is you can use the timestamp to overcome such limitation.