Posted: 22 Aug 2017 17:26 EDT Last activity: 25 Aug 2017 14:35 EDT
Standard Pega agent not executing agent activity
I created a new Pega agent of type standard with ACM enabled. I used Queue-For-Agent method to queue request to agent. The MinAgeForProcessing is set to 1 min and the agent is scheduled to run every 60 s.
Following are the changes I have already tried based on existing post suggestions -
1. Ensured that the agent access group and RSV is correct
2. Agent activity belongs to the right RSV
3. Checked Bypass activity authentication in Agents Security tab
4. Cleared cache and restarted JVMs
I am able to verify that agent ran is through entries in PR_SYS_QUEUES table and Pega log -
2017-08-22 14:09:26,088 [fault (self-tuning)'] [ STANDARD] [ PegaDM:07.10] ( internal.async.Agent) INFO - System date: Tue Aug 22 14:09:26 PDT 2017 Total memory: 2,093,809,664 Free memory: 724,795,632 Requestor Count: 11 Shared Pages memory usage: 0%
If the agent type is "standard", then the agent is queue based and will not execute your activity unless it finds system queue items for it to process.
Could you try changing the agent type to "advance" (when the agent “wakes up,” it runs the activity directly, and that activity may either call the agent queue, or just do processing without a queue) and see if it is executing the activity.
Thanks for responding. I changed the agent type to advance and it did not make a difference. I have added some logs in the agent activity but I see no trace of it in Pega logs. When I run the activity directly, it runs without issue and logs in Pega as well. It appears as though the agent is unable to detect an agent activity. Any other ideas?
Posted: 4 years ago
Posted: 23 Aug 2017 22:50 EDT
Vikash Ranjan Karn (Vikash Karn)
Senior Technical Solutions Engineer
What do you see when tracing the agent? Include the DB Query event type and all rulesets in the trace. When using a standard agent, having the DB Query event type enabled will allow you to see if any records were retrieved to be processed.
I was able to resolve the issue. The problem was that agent activity was defined in the child class 1 or pyWorkPage class since it required some processing on work object. When the request was queued to the agent, it was invoked with step page of a different class 2, which was necessary in my scenario. The agent kept searching for the agent activity in class 2 context. Once I redefined the agent activity in the parent class, it worked as it was parent class of class 2. From there I invoked the business logic written in pyWorkPage class.