Support Article
PRRuntimeException occurs and a custom agent stops processing
SA-90375
Summary
PRRuntimeException occurs and a custom agent stops processing.
Error Messages
com.pega.pegarules.pub.PRRuntimeException: unable to execute agent: AgentRuleset #0: MyCo-MyOrg-Work-MyClass.MyAgentActivityCannot obtain a lock on instance TVSA-MX-TBA-WORK SAV-2114, as Requestor HAAA0AAAAAA0AA0AAAAA0GAA000A0AAA0A already has the lock
Steps to Reproduce
Start the custom agent.
Root Cause
An issue in the custom application code or rules.
Error Handling was not in place to account for scenarios where the agent attempted to obtain a lock on a work object, on which another requestor already had a lock.
Resolution
Here’s the explanation for the reported behavior:
The error occurred because another requestor already has a lock on the object which the agent is trying to update. Hence, this causes the activity to exit and the agent to stop processing.
As a local-change, add an Error Handling for the functionality that attempts to lock the work object.
Published March 28, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.