Ability to call notesAgent.RunOnServer without waiting for the execution of agent 
Use this IdeaSpace to post ideas about Domino Designer.

: 14
: 17
: 3
: Domino Designer
: agent
: Alexey Katyushyn3674 29 May 2012
: / Email
It would be nice to be able to call notesAgent.RunOnServer without waiting for the execution of the agent. It would be possible to introduce an optional second parameter IsWaitExecution, the default value is True. Example:
Call notesAgent.RunOnServer( [ noteID$ ], [ IsWaitExecution ] )

1) Kenneth Axi2537 (30 May 2012)
Don't see the need for this; the obvious solution would be to run the agent with SendConsoleCommand - then You don't have to wait for the agent to finish before continuing execution of Your agent.
2) Alexey Katyushyn3674 (30 May 2012)
This is a workaround. In addition, there is a security restriction on the ability to run SendConsoleCommand.
Much easier to have a second option, as I described!
3) Mark Demicoli10736 (01 Jun 2012)
Interesting idea but I think complicated to implement because it introduces synchronisation problems. There would have to be a callback function within the code similar to NotesTimer, again issues arise since the calling code may terminate before the asynchronous call completes. Could you explain why you'd like this feature as there may be an existing way ot achieving same?
4) Alexey Katyushyn3674 (04 Jun 2012)
1. Need to modify the response documents without the author's access to them.
2. Because of the considerable time of document processing, so as not to wait for the end of execution.
5) Mark Demicoli10736 (04 Jun 2012)
I'm voting this idea up because I think it might be useful, but I suspect maybe your code or database structure could be more efficient if you're genuinely having application performance issues. How are you updating responses? How long does it typically take?
6) Alexey Katyushyn3674 (05 Jun 2012)
Thanks, Mark
In the example of the response document performance problems did not exist. But they may be, if the number of response documents is large.

From what I've come across recently. Developed a custom application for organizing mailings. The user clicks a button to perform list. Newsletter uses an image, the body in html-format, the stream to form a MIME-fields. All this is done on the server and takes time proportional to the number of mailing lists. After pressing the button, after Agent.RunOnServer the user waits for the execution list.
7) Mark Demicoli10736 (05 Jun 2012)
OK so for simple updates to Author fields it shouldn't take a huge amount of time even with a large number of documents - on the other hand what you're talking about now is complex processing and mass-mailing.

My suggestion is that you don't process such requests immediately - create a separate database to act as a queue for processing such mailouts, with scheduled agent that runs every 15-30 min. When such a 'publish' occurs a request 'stub' is created in the queue database and processed on schedule. When completed the user that submitted it is notified and stub set to 'completed'. This way you also have an audit of what happened and when, which can be useful.

8) Alexey Katyushyn3674 (05 Jun 2012)
Dear Mark,
Initially it was implemented on a schedule agent.
But I thought it could be done better. And tried to use Agent.RunOnServer :)
9) Peter Neidhart1567 (07 Jun 2012)
How to you prevent multiple parallel execution of the server agent?
I implemented something similar to this by a small agent that was started by RunOnServer and did nothing else than a tell amgr run...
Based on experience the users will press the button over and over because
they don't get an immediate response.
10) Mark Demicoli10736 (07 Jun 2012)
Actually Peter is right Notes is not an assynchronous architecture except for the 'hopelessly fragile' NotesTimer. Voting this down.
11) Vlad Sh10679 (28 Jun 2012)
> 9) Peter Neidhart635 (07.06.2012)
> How to you prevent multiple parallel execution of the server agent?
It is perfectly solved by using the (hard-) locking mechanism.

> 10) Mark Demicoli8588 (07.06.2012)
> Actually Peter is right Notes is not an assynchronous architecture except for the 'hopelessly fragile' NotesTimer.
Run multiple background agents and you get all asinhnonnost "problems" described by Peter.

I vote for this idea, as there are many operations where the wait for a response from the server, the user does not need. For example export data in a relational database. The user performed some action, and some data must go immediately. He does not need to wait for the result.
12) Simon O'Doherty223 (28 Aug 2012)
The easiest option for this sort of thing is to create a document which goes to a view that is monitored by an agent. Then have that agent process outstanding requests and move them out of the view.

Easier to audit that way and recover if something went wrong during agent execution.


Welcome to IdeaJam

You can run IdeaJam™ in your company. It's easy to install, setup and customize. Your employees, partners and customers will immediately see results.

Use IdeaJam to:

  • Collect ideas from employees
  • Solicit feedback and suggestions from employees and customers
  • Run innovation contests and competitions
  • Validate concepts
  • Use the power of "crowd-sourcing" to rank ideas and allow the best ideas to rise to the top

IdeaJam™ works with:

  • IBM Connections
  • IBM Lotus Quickr
  • Blogs and Wikis
  • Websphere Portal
  • Microsoft Sharepoint
  • and other applications.

IdeaJam has an extensive set of widgets and API's that allow you to extend and integrate IdeaJam™ with other applications.

Learn more about IdeaJam >>

IdeaJam developed by

Elguji Software Logo