Question

4
Replies
580
Views
Maurice Boer (MAURICEBOER)
Nationale Nederlanden

Nationale Nederlanden
NL
MAURICEBOER Member since 2010 13 posts
Nationale Nederlanden
Posted: October 6, 2019
Last activity: October 17, 2019
Posted: 6 Oct 2019 17:20 EDT
Last activity: 17 Oct 2019 2:49 EDT
Closed

Check Agents status by Agent

We try to use the Agent Management functionality in Pega 7.2.2 by an Agent to check the status of Agents. Running by a user works fine, but when executed by an Agent we got the following error:

We try to use the Agent Management functionality in Pega 7.2.2 by an Agent to check the status of Agents. Running by a user works fine, but when executed by an Agent we got the following error:

2019-10-06 22:42:49,162 [.PRPCWorkManager : 1] (ernal.async.BatchRequestorTask) ERROR - Batch activity "Data-SystemOperations-AgentManagement-AgentInfo.PSCCheckAgentsInNode" threw:
java.lang.NullPointerException
at com.pegarules.generated.activity.ra_action_psccheckagentsinnode_03252bf5df8baf974ee3c6ca2fde0f80.step5_circum0(ra_action_psccheckagentsinnode_03252bf5df8baf974ee3c6ca2fde0f80.java:727)
at com.pegarules.generated.activity.ra_action_psccheckagentsinnode_03252bf5df8baf974ee3c6ca2fde0f80.perform(ra_action_psccheckagentsinnode_03252bf5df8baf974ee3c6ca2fde0f80.java:159)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3553)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.runActivity(QueueProcessor.java:749)
at com.pega.pegarules.session.internal.async.agent.QueueProcessor.execute(QueueProcessor.java:618)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:1000)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1286)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1034)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:916)
at com.pega.pegarules.session.internal.async.BatchRequestorTask.run(BatchRequestorTask.java:707)
at com.pega.pegarules.session.internal.async.Agent.queueBatchActivityForAgent(Agent.java:1532)
at com.pega.pegarules.session.internal.async.Agent.queueBatchActivityForAgent(Agent.java:1303)
at com.pega.pegarules.session.internal.async.AgentQueue.run(AgentQueue.java:917)
at com.pega.pegarules.session.internal.async.Agent.runAgentTask(Agent.java:947)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.processAsyncTask(AsyncServant.java:222)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.AsyncServant.invoke(AsyncServant.java:168)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:331)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:274)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:246)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
at com.pega.pegarules.session.internal.engineinterface.etier.mdb.PRAsync.processRequest(PRAsync.java:155)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.AsyncTask.run(AsyncTask.java:64)
at com.pega.pegarules.session.internal.engineinterface.etier.asynchbeans.RunnableWrapper.run(RunnableWrapper.java:71)
at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:271)
at java.security.AccessController.doPrivileged(AccessController.java:647)
at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:797)
at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:222)
at com.ibm.ws.asynchbeans.ABWorkItemImpl.run(ABWorkItemImpl.java:206)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)

Step 5 contains the following java (as in Agent Mangement):

String nodeId = tools.getParamValue("nodeId");
String agentDetailsInJSONFormat = pega.getSystemOperationsProvider().getAgentManagementAPI().getAllAgentsInfoForNode(nodeId);

try{
tools.getPrimaryPage().adoptJSONArray(agentDetailsInJSONFormat,"pxResults");
}catch(InvalidStreamError e){
oLog.error("error while adopting agents list to clipboard"+e);
e.printStackTrace();
}

Anyone clue why the Agent will not run by an agent?

Pega Platform
Moderation Team has archived post, 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.