Standard agent runs repeatedly not taking the schedule
When a standard agent is configured to run periodically and based on a condition will re-queue the same work object back to itself, the re-queued item is picked up immediately instead of waiting for the next interval on the agent schedule.
Steps to Reproduce
- Create a standard agent with Periodic schedule.
- Create an agent activity with a condition that if not met will cause the case to be re-queued to this agent.
An issue in the custom application code or rules.
Here’s the explanation for the reported behavior:
This is the expected behavior as the re-queue configuration used makes the queue item available immediately to an actively running agent which will pick up the new queue item before going to sleep and waiting for the next period. To avoid this sequence, place an allotment of time in the MinimumAgeForProcessing field for the method queueforagent as described on the following PDN article: https://pdn.pega.com/about-queue-agent-method. This will cause the queue entry to not be available until the agent goes to sleep and won't be picked up until next run time.