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.
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
If the queued item is an assignment, set the step page to the assignment page
- If the Step Page value in the step is blank, the primary page of the calling activity is used.
This method has four parameters:
|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.|
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
Default value: 1
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.|
The system creates an entry in the
database table as an instance of the
This occurs immediately, or upon the next Commit method execution, depending on the
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.
To see a list of queue items with a
status, which means the
agent tried to process the item the number of times specified by
without success, select
and click the
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.