Back Forward Queue-For-Agent method

Methods and instructions by function

Use this method when constructing the application logic that queues items such as work items or assignments to be processed in the background by an agent. This method stores a request for processing as a persistent object (entry) in the system queue. The method specifies:

Alternatively, your application can call the standard activity @baseclass.QueueForAgent, which has a single step that calls this method.

Step Page

Optional. Identify in the step page for this method (or for a step that calls the standard activity @baseclass.QueueForAgent) the class of the work item or other item that is to be processed. This page is available later as context to the agent activity processing the item. For example:

Parameters

This method has four parameters:

Parameter

Description

AgentRuleSet

The name of the agents rule of the agent that is to process the queue entry. (The name of an agents rule matches the name of a RuleSet.)

AgentName

The name of the specific agent that processes the queue entry. This agent must be listed in the agents rule identified by the Agent RuleSet parameter.

MaxAttempts

Optional. The number of tries the agent makes to process the queue entry. If the agent attempts to process the entry this number of times without success, it keeps the item in the queue but changes its status to Broken-Process.

Default value: 1

MinimumAgeforProcessing

Optional. The minimum age of a queue entry in milliseconds before the agent tries to process it. The dequeueing process ignores (skips over) any entries that are newer than this value.

For example, if users create queue entries while processing work items, it is important to ensure that a user releases all work item locks before an agent attempts to process the queue entry. To address this requirement, configure a small delay with the MinimumAgeForProcessing parameter.

The default value is 0, which means the agent can process a queue entry immediately, regardless of its age.

Deferred

Select to defer creation of the queue item until the next Commit method is executed. If not selected, the method creates the queue item immediately and cannot be rolled back.

Results

The system creates an entry in the pr_sys_queues database table as an instance of the System-Queue-DefaultEntry class. This occurs immediately, or upon the next Commit method execution, depending on the Deferred parameter setting.

The item remains in the queue until processed by an agent.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Broken queue

To see a list of queue items with a Broken-Process status, which means the agent tried to process the item the number of times specified by MaxAttempts without success, select> Process and Rules > Tools > Work Admin > Broken Queue Items. This menu selection runs the standard list view report System-Queue-.BrokenItems.All.

Users who hold the @baseclass. ReconcileBrokenQueueItems privilege can resubmit or delete broken queue items.

Other System-Queue- classes

Advanced featureUse a Java step and PublicAPI methods, not the Queue-for-Agent method, to create queue items of System-Queue- classes other than the default (System-Queue-DefaultEntry). For an example, see the standard activity Assign-.AddAssign.

Definitions agent
Related topics Agents — Concepts and terms

UpMethods and instructions by function