Close popover
John Bushey (JohnB097)
Application Architect
JohnB097 Member since 2018 16 posts
Posted: December 9, 2019
Last activity: December 11, 2019

Need advice for QueueForAgent

How does Pega recommend that we use QueueForAgent? What class should I queue? Should it always inherit from System-queue?

We use a lot of custom agents to automate our process. Before I joined the team someone coded a flow to call QueueForAgent using the primary work- page. They did not create a separate class to simply queue the key of the case. They queued the entire work object. I don't like this because I can't tell if Pega's code refreshes the case before the agent begins processing or if it is working with a stale copy. To complicate things the developer used obj-refresh-and-lock to get a fresh copy of the case using the release lock on commit option at the top of the agent code. I think this code is just creating a conflict with Pega's internal agent code leading to issues. We are having sporadic issues where assignments are lost. Unfortunately there are no errors in the logs to help me fix the issue.

In another part of our application that is more reliable the developers opted to create a separate queue class that inherits from system-queue to simply queue up the key to the case that needs to be processed. The agent code opens the case and calls resumeflow to process the work.

I have looked at some of the OOTB pega agents. PRPC mostly queues up either assign- or system-queue- classes. I've seen some framework agents processing work- queue records but they don't seem to be doing flow processing.

Case Management
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.