LinkedIn
Copied!

Table of Contents

Queue-For-Agent method

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:

  • Which agent is to process the queue entry
  • How many times the agent attempts to process the entry
  • How long the entry is to remain in the queue before the agent can try to process it the first time.

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:

  • If the queued item refers to a work item, set the step page to the work page (typically pyWorkPage ).
  • If the queued item is an assignment, set the step page to the assignment page (typically NewAssignPage )
  • If the Step Page value in the step is blank, the primary page of the calling activity is used.

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 Configure System Operations Queue Management and click the Broken queue.

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

Other System-Queue- classes

Use 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.

Related Content

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.