Agents - Using 'Document Selection'

I’m probably the only one experiencing this, but what the heck…I’ll send it up the flagpole, and see if anyone salutes it…

I’m using LEI 3, and created a Scripted Activity document. I entered the server (“ServerX”), db (“DatabaseX”), and agent name (“AgentX”).

GOAL:

My goal was to have a daily process that deletes log documents which are over 14 days old.

ServerX:

(1) LEI Server is cross-certified with ServerX

DatabaseX:

(1) FT Indexed? : Yes

(2) ACL: LEI Server has sufficient access to DatabaseX

AgentX:

(1) Shared

(2) Trigger: On Event

(3) Runtime: Agent list selection

(4) Target: All documents in database

(5) Document Selection: date created is older than 14 days

(6) Action: Delete document

PROBLEM:

LEI agent fails with message “Error: Lotus Notes: No documents found (3874)”, but there are a few hundred documents that meet the criteria. The subsequent action is probably immaterial here, since no documents are being found.

If anyone has encountered - and resolved - a similar problem with using the Simple Search via the ‘Document Selection’ event, please let me know.

Many thanks,

Dan Toma

Subject: Agents - Using ‘Document Selection’

Side-stepping your approach, I’ll suggest two others:

  1. Use database archiving (from database properties).

  2. For more control, use a simple agent like the following:

Sub Initialize

Dim sess As New NotesSession

Dim db As NotesDatabase

Dim dc As NotesDocumentcollection

Dim sQuery As String

Dim ndt As New NotesDateTime( "12/12/1980" )

Dim Count As Integer



Set db = sess.CurrentDatabase



sQuery = |@Created < @adjust( @Today; 0; 0; -15; 0; 0; 0 )|

Set dc = db.search( sQuery, ndt, 0 )

Count% = dc.Count

Call dc.RemoveAll(True)

Print " purged " & Count% & " documents"

End Sub

Subject: RE: Agents - Using ‘Document Selection’

Thank you for your input, sir! I figured I’d try to leverage one of R6’ new designer (agent)features (‘Document Selection’), and that it’d be a “lay-up”. I’m not one to give up easily, to the point of stubbornness. In this case, there was no hard, fast deadline, so I was trying to ‘make it work’. However, I thought someone else might have run into the same issue. In any case, I appreciate the reply!

Dan Toma

Subject: Or better yet, Use File, Replication, Settings Space Savers, Remove documents not modified in 15 days.

Subject: RE: Or better yet, Use File, Replication, Settings Space Savers, Remove documents not modified in 15 days.

Thanks for the input, Bill! I’m going to give that a shot, as well!