Agent picking up same item repeatedly
The application is configured with a standard agent that is used to process child work objects. The queue items are generated with a Max Attempts value of 10. The user noticed that the queue item is being re-queued even though the child work object was processed successfully.
Cannot obtain a lock on instance ORG-APP-WORK <ID>, as Requestor <RequestorID> already has the lock
Steps to Reproduce
- Create a parent case and three child items for this case.
- Configure a standard agent to process the child cases.
- Queue three child cases to the agent where the agent activity will initiate a flow until the child item is processed to completion.
An issue in the custom application code or rules where a lock error in the activity caused the queue item to be re-queued and processed again
The queue item shows the pyMaxAttempts set to 10 and the pyMinimumAgeForProcessing set to 500 milliseconds. To ensure the queue item does not get picked up again until the next agent run, you need to make sure that the pyMinimumAgeForProcessing value is longer than the interval for the agent.
The following article describes this scenario:
Logic can also be added to the activity where the lock error occurred to check the status. If you still want to continue processing even though that step failed, use the Activity-Clear-Status method to clear the error.
0% found this useful