LotusScript agents property does not list all agents in a database

Hi,

I need to find all scheduled agents on our servers. I’ve tried the code below ,i’ve tried AgentEz from Ytria , dbDesign from Damian Katz

I finally found that it is not possible to find personal agents (See technote below)

Do you have any other way around?

The LotusScript Agents property (of the NotesDatabase class) does not list all agents in a database. You find that it does not include private agents.

For example, you have a database that contains 20 agents. When you execute the following code it does not list all of the agents. It does not include the private agents.

Dim session As New NotesSession

Dim database As NotesDatabase

Set database = session.CurrentDatabase

Forall a In database.Agents

Print a.Name

End Forall

Content

The LotusScript Agents property is designed to include only the private agents belong to the user on whose authority the code is being executed. Note, that this is true of the Views property as well - it does not include private folders/views. This is true regardless of whether or not the Full Access Adminstration feature is enabled.

Workaround

If you are creating an agent that needs to access private agents, then the owner of those agents must run the agent for it to work.

If a private agent is modified by a Designer or Manager, then they will now become the user associated with that private agent.

Supporting Information

Users with Designer and Manager access will be able to see private agents listed when viewing the design using the Domino Designer client. If a local replica exists, which does not enforce a consistent Access Control List, then any user will be able to view the private agents using the Domino Designer client.

Subject: LotusScript agents property does not list all agents in a database

I’m just working on a script to update old signatures on design elements. I am using NotesNoteCollection to gather the design elements. You can use the SelectAgents property to limit the collection to only Agent notes. You can convert the Note to a Document to get the agent properties. In doing my testing I think it was picking up private agents as well but I am not 100% certain. Give it a shot. You may need to run your script in an agent using runonserver and let the Server ID run it since the server should be able to see the private agents. HTH

Subject: agentEZ can display private agents but you need to adjust one setting

Hi Jean-Yves,I just wanted to mention that agentEZ will indeed show private agents, but we don’t switch that feature on by default because of performance considerations.

If you check out the ‘Databases’ panel, there are a couple pull-down menus–the one on the right lets you toggle between “Design Collection” (the default–it’s faster but doesn’t show private/personal agents) and “Basic Search” (shows private agents).

Cheers and have a great weekend,

Peter

Subject: RE: agentEZ can display private agents but you need to adjust one setting

Peter

Good, thanks for the infos

JYR

Subject: RE: LotusScript agents property does not list all agents in a database

Doug,

I’Ve did a test and it doesn’t seems to work for private agents (Sign by the server)

I’m gonna check thsi weekend

Thanks,

JYR