Monday, July 30, 2018

Overview on Agent Rule

    • In Pega Agent is an Internal Background Process operating on the server.
    • Agent runs activities on a specific interval of time 
    • Each Ruleset contain only one agent rule 
    • Agents are autonomous and asynchronous: the activities they call run individually on their own schedules, and one activity does not have to finish before another one runs.
    • Agent rules are instances of the Rule-Agent-Queue class. They are part of the SysAdmin category.
Create and Work With Agent Rule



Schedule Tab







Agent Name   

       Agent name is unique within the list of agents in this agents rule. 
Pattern


Periodic — The agent runs the activity and then "sleeps" for the number of seconds entered in the Interval column.

Recurring — The agent runs the activity based on a specified calendar schedule (for example, every Monday at 5:00 P.M.).

Startup — The agent runs the activity once at startup based on a specified parameter.

Interval

If the pattern is Periodic then we can define the time interval (In sec) for the agent to Run .

If the pattern is Recurring then we have an option to run the agent in a recurring manner .
Daily /Weekly /Monthly /Weekly .


Mode

Generally we have 2 Mode.
Standard Mode and Advance Mode.
Legacy Mode - Specifies that this is an agent that was created in a version prior to PRPC Version 5.4 and has not yet been updated. This option is not available for agents created in PRPC Version 5.4 or later.




Standard Agent


  • ·       Standard Agent always process the items from queue 
  • ·       For Standard agent system will take care of locking and transaction mechanism.( System-Queue-.EstablishContext activity is responsible for open and lock queue item)
  • ·       Standard Agent Supports AQM .

What is AQM  (Auto Queue Management)??





Why to check this(AQM) check box?


  • ·       If  this check box is checked and queue item can't be processed  the system requeues the item and the agent can try again the next time it wakes up.
  • ·       If this is not checked, then the agent gets only one chance to process it and do not persist the queue item.




Suppose we have a business scenario where we have to update a case using an agent and that case is locked by some requestor. Then accruing the lock to that case will fails . In this case AQM comes to picture .it will queue the same item again for later processing and to try the same after some time . provided pyMaxAttempts is not crossed .




What is this MaxAttempts ?

This property called pyMaxAttempts is set on queue page . This determines how many times the agent should try the failure attempts before going to broken queue .

What is the time gap to retry, or it will try immediately?

Trying immediately, after a fail attempt to accrue the lock does not sounds logical.
 So we have a property called pyMinimumAgeOfProcessing
This property determines the time interval after which the agent should do the next try .
The time is in Sec .



Advance Agent

In case of an advance agent the once the agent wakes up it will not check the queue rather it will directly run the agent activity.
Unlike standard agent the lock handle mechanism should be taken care in agent activity .
There is no AQM concept in case of Advance Agent .

Category
Just to identify the role where the agent belongs.

Enable  - Used to enable and disable an Agent 

Max record – Suppose we have 100 items in an queue , and we have specified max record as 30 , then in this case when the agent wakes up then it will process only 30 records before going to sleep .

Security Tab

In the security tab we can give the access group which is useful for an advance agent to identify agent activity rule based on rule resolution.

But it’s not mandatory field. So if it’s blank then it will take access group from Batch requestor.
In case of standard agent it will use the access group of the requestor who is queuing the item.

 Bypass activity authentication – If this check box is enabled then it will bypass all the security authentication used on activity 



Nodes


This tab is used to specify the node for the agent to run
We have to enable and disable this from an agent schedule

What is Agent Schedule ?

Agent schedule is a Data Instance which is generated by master agent for each node .

From the agent schedule we can choose whether to enable and disable an agent in particular node or to change the time interval for running .



How to Trace an Agent

We can trace the agent from SMA or from Agent Management (Available after 7.2.2).



Tracing an agent from Agent Management is very easy.
Just select the agent name and click on trace. Check the below screen shot



There is a trick to trace the agents from SMA .

  1. From SMA Click on Agent Management à Agents
  2. Select the agent
  3. Click on Delay.
  4. Click on Requestor Management
  5. It will show the delayed agent ( keep refreshing if it’s not showing . generally it takes time to show )
  6.  Select and Click on trace 





















5 comments:

  1. Thank you so much Rakesh :) i have one doubt... can you please explain batch requestor in detail?

    ReplyDelete
  2. This article covers all the most effective on-line casinos that offer the most effective casino games with quantity of} rewards, bonuses, and quick withdrawals. Most casinos personal slot machines, and it has been reported that round only 15% of Vegas slot machines are rented. Online games, on the other hand|however|then again}, aren't owned by any casino operators - the very fact fact} that|although} even when you play slots on-line free of charge, you will notice the logo of one operator or one other. This slots information SM카지노 has thus far centered on the online variants, but we will now delve further into slot machines generally.

    ReplyDelete

Featured post

Queue Processor

  Overview Starting with Pega Platform version 8.1, Job Scheduler and Queue Processor rules replace Agents and improve background processi...

Popular Posts