message.setIntHeader("type", MsgType.NOTICE_VALUE);//设置消息类型为通知
message.setIntHeader("bizType", MsgBizType.WORKFLOW_VALUE);//业务类型设置为工作流message.setIntHeader("sourceStatus", MsgSourceStatus.EMPTY_VALUE);//设置任务状态,此处是通知消息,所以设置空message.setIntHeader("priority", MsgPriority.MIDDLE_VALUE);//设置消息优先级,自己根据需要设定相应的级别message.setStringHeader("databaseCenter", ctx.getAIS());//得到数据中心
message.setStringHeader("solution", ctx.getSolution());//设置解决方案message.setStringHeader("receiver", '4ff9eebb-0108-1000-e000-15acc0a813c813B7DE7F;4ff9eebb-0108-1000-e000-1db0c0a813c813B7DE7F'); //设置接收者,后面那参数是用户ID,多个ID可用分号";"分割
senderAgent.sendMessage(message); //发送消息/**
* 获取ctx的语言信息列表 * * @param ctx * @return */public static Locale[] getContextLocales(Context ctx) { Locale[] locales = null; SolutionInfo solu = MetaDataLoaderFactory.getLocalMetaDataLoader(ctx) .getSolution();if (solu != null) {
LanguageCollection langs = solu.getLanguages(); if (langs != null) {locales = new Locale[langs.size()];
for (int i = 0; i < langs.size(); i++) {
locales[i] = langs.get(i).getLocale(); } } }return locales;
}/**
* 客户端自定义按钮 */ private KDWorkButton b1; @override public void onLoad() throws Exception{ b1.addActionListener(new addActionListener(){ public void actionPerformed(ActionEvent e){ ......... } }) }