Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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

  1. Write an automation agent to check if an agent is down in the current node. If it is down, it will restart the agent
  2. Configure the Data-Agent-Queue class to get the list of all the agents for the specific ruleset on the node
  3. Use the Embed-Rule-FutureQueue class to get the details of each agent for that ruleset.
  4. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice