Hi there,when I’m saving a document in my web-app, an agent is launchen on WebQuerySave-event. This agent (A) is doing three things: sends mails, launches another agent (B) and forwards the user to a new URL.
Agent B generates a calendar for 2005-2007 and puts the HTML-code into a document. This agent runs approximately 4.5 seconds. Afterwards, the user is forwarded. Here my question: how can I call agent B without having to let the user wait until agent B has finished?
Thanks for any hint,
Buzzy
Subject: Don’t know if it’ll work, but…
What if you create a field called $$Return and populate it with the URL you want people to go to, like this “[http://www.myserver.com/thx4submit]”.
My guess, though, is that it won’t happen until all the agents are done.
What about having the first agent print (as the last thing it does) “[http://www.myserver.com/thx4submit]”. This should force the browser to redirect… But then again, don’t know if it still needs to run the last agents before it actually happens…
Anyway, I’ve never tried it, but please let know if it works!
Regards,
Hans
Subject: RE: Don’t know if it’ll work, but…
Hi,well I already tried to redirect before I launched the other agent, but the result was the same - the user had to wait, until all agents finished.
Besides: I’m afraid I have to accept the delay, because only after all agents are finished, the HTML-calendar is up-to-date. (The agent is called, when a new training course is created. The day on which it takes place is highlighted in the calendar…).
But thanks for your ideas!
Buzzy
Subject: Launching agents from web
Enable con-current agents in the server record, separate the agents to be invoked by means other than ‘run’ method (run methods waits).
Subject: RE: Launching agents from web
I’ll give it a try, thanks!Buzzy