Solved

Configuration File for Agent

Posted on 2003-11-14
6
267 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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 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

18 Experts available now in Live!

Get 1:1 Help Now