Reputation: 462
Brief description
We do have multiple Domino Servers (DS
). Each DS
is hosting several maildatabases. I would like to delete specific mail database. The deletion process gets triggered by an external application, which can run DS
agents. The external application can also pass parameters to the agent.
Infrastructure overview
I have 1 notes database (ND
) called delete-database.nsf
. This ND
is replicated with 3 Domino Servers (DS
), lets call them DS1
, DS2
and DS3
.
Workflow
The external application will run the agent1
on DS1
with the parameters mailserver and mailfilename. Let's say the mailserver-parameter-value is DS2
and mailfilename-parameter is mail\doe.nsf
.
Due to I can't delete a mail database which is not on same DS
like the agent is currently running, I'm calling agent2
on replica database (based on mailserver-paramter) and also passing the mailfilename.
Agent2
should receive the malfilename-parameter and delete the maildatabase, which is located on the same DS
like itself.
Question
How can I call from agent1
on DS1
another agent called agent2
on DS2
and also pass parameters like mailfilename.
I tried this, but it doesn't call the agent2 and also not passing the parameters.
Code of agent1
:
Dim ses As New NotesSession
Dim db2 As NotesDatabase
Dim agent2 As NotesAgent
Dim docTemp As NotesDocument
Set db2 = New NotesDatabase( "DS2/Certifier", "delete-database.nsf" )
Set agent2 = db2.GetAgent( "agent2" )
Set docTemp = New NotesDocument( db2 )
' Parameters
docTemp.mailfilename = "mail\doe.nsf"
Call agent2.runWithDocumentContext( docTemp )
Code of agent2
:
Dim ses As New NotesSession
Dim docTemp As NotesDocument
Dim description As String
Dim mailserver As String
Dim mailfilename As String
Set docTemp = ses.DocumentContext
mailfilename = docTemp.mailfilename
' * Delete mail file part *
' * ... *
' * Delete mail file part *
Upvotes: 0
Views: 554
Reputation: 2359
By far the easiest method is to send the other database an internal mail, with all the info you need. In the other db you create an agent that runs on When mail has arrived, checks whether it comes from the right source, and then executes whatever you need. You only have to set your db up as a mail-in database.
Upvotes: 0