Support Article
Agent failure status not captured correctly in Data-Agent-Queue
SA-73843
Summary
Agent failure status is not captured correctly in the Data-Agent-Queue class.
Error Messages
Not Applicable.
Steps to Reproduce
- Write an automation agent to check if an agent is down in the current node. If it is down, it will restart the agent
- Configure the Data-Agent-Queue class to get the list of all the agents for the specific ruleset on the node
- Use the Embed-Rule-FutureQueue class to get the details of each agent for that ruleset.
- Run the custom activity to get the agent details
Root Cause
There were scenarios where the pyFatalMessage property is not populated.
Resolution
Perform the following local-change:Use the following API instead of checking the pyFatalMessage property:
com.pega.pegarules.pub.context.AgentUtils.getAgentDetailsForNode(String, String, String) to get agent details.
Here's the example code used:
Map<String, Object> agentDetails = tools.getAgentUtils().getAgentDetailsForNode(RuleSetName,queueName, nodeName);
This map has agentStatus, fatalMessage, dateRun, and timetocComplete keys.
Published May 11, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.