在Lotus Notes中运行Java代理 [英] Running java agents in lotus notes

查看:74
本文介绍了在Lotus Notes中运行Java代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Lotus Notes 8.5,并且在视图->代理程序中,我创建了新的代理程序并选择了Java语言,并尝试测试代理程序的基本运行.

Hi I am using lotus notes 8.5 and in view -> Agents i created a new Agent and selected java language and tried to test the basic running of the Agent.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

    public void NotesMain() {

        try {
            Session session = getSession();
            AgentContext agentContext = session.getAgentContext();

            System.out.println("Sample Test of Lotus Notes Agent!");
        } catch(Exception e) {
            e.printStackTrace();
        }
    }
}

因此,基本上以上代码必须在Java调试控制台中打印为"Lotus Notes Agent的样本测试!".但这不起作用.

so basically the above code must print in the java debugging console as "Sample Test of Lotus Notes Agent!" but it doesn't work.

顺便说一句,它被触发在新邮件到达后"运行,我也没有Domino Designer客户端.我必须以某种方式使其在Lotus Notes本身中起作用(无法安装其他任何工具,例如eclipse.)

BTW it is triggered to run at "After new mail has arrived" also i don't have Domino designer client. I must somehow make it work in lotus notes itself(cannot install any other tools like eclipse..)

就像我在评论中提到的那样,我什至试图安排时间,还尝试了事件触发器,但这不起作用,但是我可以通过从菜单中选择运行"来手动运行代理.

like i have mentioned in the comments i even tried to schedule and also tried event triggers but this doesn't work but i can manually run the agent by selecting "RUN" from the menu.

谢谢!

推荐答案

您可以将LotusScript代码添加到收件箱"文件夹的Queryrecalc事件中.这样,刷新收件箱后,代码将在客户端上运行.您也可以从此LotusScript代码启动Java代理.

You could add LotusScript code to Queryrecalc event of the Inbox folder. That way the code will run on client when Inbox is refreshed. You can also start a Java agent from this LotusScript code.

另一种可能性是将邮件数据库复制到客户端,并在那里甚至运行基于或计划的后台代理.

Another possibility is to replicate the mail databases to client and run even based or scheduled background agents there.

这篇关于在Lotus Notes中运行Java代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆