1.发送消息至消息中心:
private void sendMessage(Context ctx, String source) throws EASBizException, BOSException {
Date today = new Date();
SenderAgent senderAgent = SenderAgent.getSenderAgent();
Message message = null;
Locale locale = ctx.getLocale();
message = MessageFactory.newMessage("kingdee.workflow");// 生成一个消息对象
message.setLocaleStringHeader("title",today+" 同步所有工程项目情况
" , locale);//
设置消息标题
message.setLocaleStringHeader("sender", ctx.getUserName(), locale);// 设置发送人,属于文本,不是
ID
message.setLocaleStringHeader("body", source, locale);// 设置消息体内容
message.setIntHeader("type", MsgType.NOTICE_VALUE);// 设置消息