1
votes

in lotus notes 6.5.6 when i have an agent that execute many other agents using agent.Run or agent.RunOnServer. So i need to know the progess state of any secondary agent.

I try to put some Print("Files processing at "+ cstr(n)+" %") in the code of any sub-agent but in the lotus notes progress bar i cannot see anything.

Is there a method or properties that allow me to show the progress state of any "sub agent" that i run from the main agent ?

thank's

2

2 Answers

2
votes

Print() doesn't work for agents started with agent.Run and neither for agents started with agent.RunOnServer. The documentation says for both:

The user cannot interact directly with a called agent. User output goes to the Domino log.

You could establish a communication between your main agent and a sub-agent with the help of an in-memory-document. The sub-agent could write current status into document regularly and main agent could 'Print()' them with the help of NotesTimer class.

As an alternative, you could use a Progress Bar like this. You could call the Java class from LotusScript with LS2J. I didn't try it though but there is a hope that Java swing doesn't count as "user output" from sub-agent's perspective.

0
votes

As the calling agent waits for the called agent to complete, there is no way to let it "do" anything while the other agent runs. You could -as Knut stated- initiate a NotesTimer in your calling agent, that on trigger reads some kind of "communication"- document (in Memory document will not work, as that possibility was introduced in 8.5.2 and is not available for 6.5). Then the timer could "print" to the statusbar. But I am not sure, if the status bar updates as long as the agent is "blocked"... You have to try.

You could also let the called agent "print" out something: The print will go to the server console, where you could react with an event (events4.nsf) and do something...

but that seems to be too much of an overhead for this task...