from THE VIEW Journal, July/August 2003
"By combining Lotus Instant Messaging (Sametime) with Domino, you can enable users to access Domino information via bots — small applications endowed with Instant Messaging capabilities. In addition to adding bots to users' chat lists, you also can build workflow applications that use bots. For example, when a document needs someone's attention, a bot can see if the user is online and send that user an instant message. In this article, you learn: how to set up your Instant Messaging development environment, how to develop bots using the Java Community Server Toolkit, and how to install and run bots that connect with Domino databases. This article comes with downloadable files — an abstract class that provides basic Sametime services and two example bots to get you started."
To obtain a copy of this article, please visit THE VIEW. Original download page (2003-05-09)
Lotus Sametime Directory Assistance Bot
Version 2.1, 2004-11-09 | This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
| Q: Where do I find the alcbot.jar, bot.properties, and start.bat files? A: These files are in download.zip. (see above) The source code is inside alcbot.jar. Q: Where do I find the NCSO.jar file? A: NCSO.jar contains the Java API for Domino servers. You can find NCSO.jar on your Domino Server. It's very important that your version of NCSO.jar matches your Domino server. When the Domino server is upgraded, you should get a new copy of NCSO.jar for your Java applications. Don't use an older version. If you have a Domino Designer client, and it's the same version as your Domino server, you can get a copy of NCSO.jar from that client. If you need a trial version of Notes/Domino software, you can find more information at http://www-10.lotus.com/ldd/down.nsf Q: Where do I find the stcommsrvrtk.jar file? A: This is the Lotus Sametime Community Server toolkit. You can download the Community Server toolkit from your Lotus Instant Messaging server at the URL: http://<SametimeHost>/Sametime/Toolkits/st31commsrvrtk/index.html where <SametimeHost> is the name or IP address of your Lotus Instant Messaging server. Installation of the toolkits on the server is optional and may not be available. You can also download it here. http://www-10.lotus.com/ldd/down.nsf Q: Where do I place the files and launch the bot? A: Any computer on your network. Q: Where do I get Java? A: You can also download and install Java at http://www.sun.com/getjava Q: The bot is running but it can't lookup information in the Domino database. What did I forget? A: Remember that the Domino server must be running the "diiop" task. Also, the dominoUsername and dominoPassword (as specified in the bot.properties file) must be allowed to access the Domino server over diiop. The ACL for the Domino database must also allow access. Q: Does DIIOP require the HTTP task? A: Not if you specifiy the port address when opening the DIIOP connection. For example, sametime.acme.com:63148 When you open a DIIOP connection without the port number, the HTTP task is needed. The HTTP task will automatically redirect your request to DIIOP. more info Q: The bot is running, but I get error 4488 - server access denied ... A: Review your DIIOP configuration on the Domino server. If you enabled "Load Internet configurations from Server\Internet Sites documents" on the Server document, then you probably need to create a "DIIOP" configuration document as well. Look in the Domino Directory. Web > Internet Sites. If you don't have a "DIIOP" configuration, create one by clicking "Add Internet Site...", and choose "IIOP" for the document type. Q: The bot is running, but I get error 4062 ... A: You need to open Port number 63148. The computer running the Sametime Bot must be allowed to connect to the "dominoServer" over the port. That's the default port number for DIIOP connections. If you're running Domino on Linux, your DIIOP port may be 60148. If you'd like to use the traditional port number, you must tell the Domino server to "ignore port limits on Linux". See DIIOPIgnorePortLimits. Q: In the bot.properties file, what is the difference between "sametimeServer" and "dominoServer"? A: The "sametimeServer" is the name of your Lotus Sametime server (Lotus Instant Messaging and Web Conferencing server). This is where your bot will login as "Directory Assistance" and chat with users. The "dominoServer" is the Lotus Domino server that the Bot will access over DIIOP, search a database view, and retrieve information. The server names could be the same, or different. This gives you the flexibility to login to one Sametime server, while searching a different Domino server for information. Q: The bot can search by first and last name. Is it possible to search for additional keywords, like phone-extension or employee id? A: Yes. You can create a new View in the Domino Directory. It should be based on the ($Users) View. When you create your custom View, make the first-column display the person's name, phone-extension, employee id, or whatever keywords should be available in the search. Also, edit the bot.properties file, and change the property for "dominoDatabaseView" to your custom View. By default this is set to "($Users)". Questions or comments? Email Brian Green For additional information, please read the article published in THE VIEW Journal, July/August 2003. |
| You can modify the Directory Assistance Bot code to create your own unique bots. For example, here is a bot that communicates with our WebCTRL building automation software. It monitors the air temperature and humidity. A new Sametime Bot was created based on the Directory Assistance Bot, and new code was inserted in to the textReceived method. The code (not provided) communicates with WebCTRL using web services, and the result is returned to the user. To create your own unique Sametime Bot 1) Duplicate the DirectoryAssistanceBot class. Give it a new name. (The source code is inside alcbot.jar.) 2) Look at the textReceived event. This event receives a text message from the user. Add your own code to the event. Interpret the user's text message, perform an action, and finally send a reply to the user. This is a fun way for Domino developers to learn some Java programming. I encourge you to publish example Sametime Bots for other developers. You can find additional help in the LDD Discussion Forum. |