pyItemStatus stuck at Now-Processing state
For a CI work item the entry is getting created in pr_sys_queue with pyItemStatus: Scheduled that changes to Now-Processing within 30 seconds in line with agent interval.
Agents ruleset WorkMgmtFW has agent ProcessDemoRequests with Activity ProcessDemoRequests and Class ABC-.
You are unable to trace the agent from SMA that suggests that the agent is not picking the work item and the activity is not getting executed.
Agent queue item continues to be at the status of Now-Processing.
Steps to Reproduce
Create agent ProcessDemoRequests and Activity ProcessDemoRequests of Class ABC- to process a work item of class System-Queue-DemoProcessing.
Queue class must be inherited from System-Queue- to be processed by a standard agent. If there is no relation between Queue class and the class given on agent rule form, then the Engine maps the given class with SYSTEM-QUEUE-DEFAULTENTRY. Since the Stored Procedure that was used to lock (mark ‘now-processing’) does not consider the class relation, it succeeds in locking. When the agent processes the entry, it tries to get the entry where class equals to SYSTEM-QUEUE or SYSTEM-QUEUE-DEFAULTENTRY and this fails.
Changing the class from ABC- to System-Queue-DemoProcessing (from application specific class to the queued class, that is, inheriting from System-Queue) for both the Agent and the Activity resolves the issue.
0% found this useful