Question

Queue Processor Total Attempts Count
Hi ,
I have a requirement to send a notification to a DL after all Max attempts are completed in a dedicated queue processor . How can i get the count of retries during execution of queue processor activity .
I can see pzAttempts property in queue Item XML in admin studio , but in which page does this property be available , its not there in primary page .
Thanks.
-
Likes (4)
-
Accepted Solution

@Adithya_Acharya - you can build a function utility to extract the value from the pzExecutionMetadata and call it in the context of your QP execution activity.
PublicAPI papi = ThreadContainer.get().getPublicAPI(); ParameterPage ppg= papi.getParameterPage(); ClipboardPage cpg = ppg.getPage("pzExecutionMetadata"); ppg.put("RC",cpg.getInteger("pzAttempts"));
use param.RC for notificaiton logic.

Hi Aditya,
Any luck on getting the issue resolved?
I have a way around it but don't know whether its the best practice.
Cheers,
Shantanu

No , I could not find any way to identify this , one option is to save the count in the primary page , so that we can access it when QP runs the next attempt.
Could you please tell is there any OOTB Page in which that will be available ? Since its visible in queue entry XML i believe it should be present in some page when QP runs .

Hi Aditya,
Any luck on getting the issue resolved as I am also facing the same issue where the queue processor is sending out the failure mail with each retry and thus misleading the support team.
Thanks,
Shibesh.

Hi Shibesh,
If your requirement is to send notification after the retry attempt then wrote Job Scheduler to pick items from broken Q and send notifications for those cases. We followed this approach.
Else other option is to store the count on Case (if acquiring lock is not an issue) , if you cannot hold the lock then you will have to create Data Type to hold the retry count .

@Adithya_Acharya Any we found an OOTB or any solution to this? We also have a similar requirement. Need to know in the QP activity that we are doing the last retry (i.e. current retry counter=max attempts)
@Will Cho For similar requirement, we are capturing the retry count in the processed object and compare it against a DSS value before initiating the additional process on it (like notification in your scenario). We were not able to identify an OOTB feature to handle the requirement.
@AMARAN84 Thanks for the update. We also ended up using DSS to store a max attempt and reference that in activity. We set the max attempt in QP to a large number like 1000 so that this won't interrupt the DSS value. We submitted a Feedback item and Pega should make the max attempt count in QP available in Tracer in a future version after 8.4.1.
Accepted Solution

@Adithya_Acharya - you can build a function utility to extract the value from the pzExecutionMetadata and call it in the context of your QP execution activity.
PublicAPI papi = ThreadContainer.get().getPublicAPI(); ParameterPage ppg= papi.getParameterPage(); ClipboardPage cpg = ppg.getPage("pzExecutionMetadata"); ppg.put("RC",cpg.getInteger("pzAttempts"));
use param.RC for notificaiton logic.