Posted: 16 Oct 2020 11:49 EDT Last activity: 16 Oct 2020 13:59 EDT
Queue-For-Processing method within a loop not committing to queue.
In an activity, I am looping case references from an incoming email listener record and attempting to attach the email to the case and set an indicator on the case. If one of the cases happens to be locked(verified by an Obj-Browse against System-Locks after the StepStatusFail), I use the Queue-For-Processing method to try the record again with our configured delay intervals. The issue is that the queued item will not show on the dedicated queue without following the Queue-For-Processing with a commit in the loop(specifically I am using commitWithErrorHandling). If not withing a loop, Queue-For-Processing seems to commit the record to the queue just fine. Is this a Pega bug? Is there a better workaround than what I have accomplished?
Thanks for any thoughts or input.
***Edited by Moderator Kayla to update Platform Capability tags****
Update - a colleague messaged me to check the 'Write now' checkbox in the Queue-For-Processing method in conjunction with the 'Queue current snapshot of page' I already had checked. In testing, that worked in all situations. Hopefully, this post can still help someone at some point.