Hi,
I was wondering, is it possible at all to model application flows which include a series of scripts and agents which are invoked in a well-coordinated manner, maybe even through some callback mechanism?
Take this example:
-
The user clicks a hotspot or a button which triggers an action written in LotusScript
-
The action performs some calculation, writes the data to a database and invokes a Java agent for further processing
-
When the Java agent has finished, a second script is invoked which e.g. informs the user about the results
Right now, I have both the scripts and the Java agent, but I don’t know how to coordinate them. I couldn’t find out any means to e.g. tell Notes that the agent has finished processing and that it should react by invoking some other script. Of course things would be simpler if I had everything in one place, e.g. one LotusScript script, but I can’t do that because I need the script for user interaction (Java can’t do that because I was told in Notes 7, they removed the Java bindings to NotesUIWorkspace) and I need the Java agent, because I need access to the HTTP-stack provided by J2SE1.4.
Do you know whether this is possible and how I would do that?
Thanks,
Matt
Subject: Inter-Agent/Script Communication and Eventing
LS2J might be an option for you. Feedback on it in the forum isn’t always positive but i’ve used it in production a couple of times and it has worked well for me.
andrew
Subject: Inter-Agent/Script Communication and Eventing
One – there never have been Java bindings to the UI. The appearance of the “Notes” prefix to the class name indicates that you are dealing with LS/COM classes. If you ever saw a reference to NotesUIWorkspace in Java documentation, it was an error, probably caused when the doco for a LS class/method was copied and modified.
Two – agents can call each other using the Run method; you can store communication particulars in a Notes document and pass the document’s NoteID as an argument to the Run method. One agent need not be aware of the language the other agent uses.
Subject: RE: Inter-Agent/Script Communication and Eventing
Hi Stan,
as to the interaction thing, maybe I wasn’t clear enough on this. What I am actually looking for is some sort of eventing or notification system between e.g. a client-side action script and a server-side agent. This is more than just calling each other and then remain oblivious of what will happen. What I need would be some sort of notification when a background agent has finished processing, so that the client can be informed and can react on that in the user interface.
Is that possible?
Best,
Matt