Solved

Configuration File for Agent

Posted on 2003-11-14
6
269 Views
Last Modified: 2013-12-18
Hello experts

I have a scheduled agent(written in lotus script) that runs everyday.
There are certain variables in the agent and Email text that I want read
from a form. So have a form with some fields that only an administrator
can edit, and the agent will read values from that form to perform its task.
Sort of like a configuration file (ini file). What would be the best
way to accomplish this?

0
Comment
Question by:marefin
  • 2
  • 2
  • 2
6 Comments
 
LVL 2

Assisted Solution

by:ksi2001
ksi2001 earned 25 total points
ID: 9748990
This is too general description.

Create form. Put desirable fields on it.

Add an action to edit profile document with this form. Make this action accessible only by administrator.

Add the following to an agent to get this document:

Dim session As New NotesSession
Dim db As NotesDatabase
Dim profile As NotesDocument

Set db=session.CurrentDatabase
Set profile=db.GetProfileDocument("AgentProfile")


0
 

Author Comment

by:marefin
ID: 9749043
So I can just create a regular form or does  it have to have special properties set for the
db to recognize it as a profileDocument
0
 
LVL 2

Expert Comment

by:ksi2001
ID: 9749121
it's just a regular form.

But in order to edit profile document you should call method EditProfile in NotesUIWorkspace or corresponding @formula.

You can also keep the configuration doc as a usual, non-profile one, but then you eill need to create a configuration view, and pick up this document from the view in agent. Make sense if you have a bunch of configuration documents.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9749274
Profile documents are greate. But they have some errorneous limitations. One it is not visible to user and it has to be accessed via script only , second during replication this might not be needed in other db but still replicates and no control on replication to avoid this document.

So I would suggest you setup a view and a form which will have some keyname and view will show it sorted by keyname and form will contain necessary parameters listed. This can be extended for future extension to other modules too.

Essentially what you do is create a document using keyform and save it , this is listed in the keyview. You agent will look for a specific keytask and pick it from this view and read the default settings and kicks on from there...

~Hemanth
0
 

Author Comment

by:marefin
ID: 9749540
Hemantha,

This is what I wanted to do in the first place, So my administrator can have a view of all the configution files (for future extensions). I was just looking for the code that lets me read values from a particular form into variables in my agent.
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
ID: 9749682
I am going to type this for you in this little box.. so excuse me for any syntax errors

Dim s as New NotesSession
Dim db as NotesDatabase
Dim view as NotesView

KeyToSearch = "Spam Config"

set db = s.CurrentDatabase
set view = db.GetView( "KeyView" )
Set doc = view.GetDocumentByKey( KeyToSearch, true)
if not doc is nothing then
 ' Here extract doc values and do necessary tasks
else
msgbox "Unable to read config doc for " & KeyToSearch
end if


And feel free to modify it to your need
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now