EAS消息主动向第三方系统推送消息

栏目:eas cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

EAS消息主动向第三方系统推送消息

配置文件详细说明

1.文件路径

eas \server\profiles\server1\config\portalConfig下的easWebConfig.xml和WSConfig.xml

2.启用与第三方系统消息集成(easWebConfig.xml)*

    <configitem name="otherSystem">

        <attribute key="toSys" value="true" />

        <attribute key="letGet" value="true"/>

     </configitem>

请确认<attribute key="toSys" value="true" />配置项的value值是“true”,来启用该功能

3.消息推送配置(WSConfig.xml

<?xml version="1.0" encoding="utf-8"?>

<config>

   <class>

      <server>http://ip:端口/easweb/webviews/workflow/transferApprove.jsp</server> //EAS portal流程中心对应的任务审批界面

      <dataCenter>db540</dataCenter>   //数据中心编码

      <path>com.kingdee.eas.base.message.webservice.testWebServiceImpl</path>  //实现类的包名加类名

     <task value="true">  //任务类型消息是否接受

          <workflow>true</workflow> //任务类型消息节点下的工作流消息是否接受

      </task>

      <notice value="true">                 //通知类型消息是否接受

           <workflow>true</workflow>     //通知类型消息节点下的工作流消息是否接受

           <forwarn>true</forwarn>         //通知类型消息节点下的预警消息是否接受

            <urgent>true</urgent>      //通知类型消息节点下的催办消息是否接受                  

                            <office>true</office>                          //办公消息类型,msgBizType=30

                            <async>true</async>                         //后台事务消息类型,msgBizType=50

                            <xitongoffice>true</xitongoffice>//协同办公消息类型,msgBizType=60

                            <hr>true</hr>                             //HR消息类型,msgBizType=70

</notice>

            <online value="true">        //即时消息是否接受

            </online>

         </class>

    </config>

标签说明

1、WSMessage对象的url字段会取<server>配置的值,如果想要在第三方系统打开审批界面可参考后面

2、<dataCenter>节点值需要配置为当前使用的数据中心编码,如果不匹配也不会发送消息,如果需要配置多个数据中心则写多个<class>标签

3、<path>节点的值是客户实现类的“包名+类名”,EAS消息中心将用反射机制来调用这个类。将这个类打包后放在sp目录下。

4、task 、notice、online等节点下的值都为true,来启用相应的任务、通知、即时消息的发送


接口详细说明

本接口暂时提供6个方法

public boolean addMessage(WSMessage message);

public boolean removeMessage(String ID);

public boolean updateMessage(String ID);

public boolean updateMessages(String ids, MsgStatus state);

public boolean addInitiatorMessage(WfrProcMessage wfrProcMessage);

public boolean addCompletedMessage(WfrAssignMessage wfrAssignMessage);

只有前面3个方法受WSConfig.xml配置文件控制

addMessage(WSMessage message)

用于在第三方系统中添加消息,其中参数message包含一些消息的信息

这个方法在获得新的消息的时候会主动调用。

WSMessage对象详解

    //消息ID

    private String msgID;

    //消息标题

    private String title;

    //消息内容

    private String body;

    //优先级

    private MsgPriority priority;

    //发送时间

    private Timestamp sendTime;

    //接受时间

    private Timestamp receiveTime;

    //源业务对象ID

    private String sourceID;

    //接收者名字

    private String receivers;

    //消息状态

    private MsgStatus state;

    //消息类型(大类)

    private MsgType type;

    //消息类型(小类)

    private MsgBizType bizType;

    //发送者名字

    private String sender;

    //url地址,取得你配置文件WSConfig的server标签值

    private String url;

    //接收人ID

    private String recieverID;

    //组织ID

    private String OrgID;

    //发送者用户名

    private String senderNumber;

    //接收者用户名

    private String recieveNumber;

    //上下文

    private Context ctx;

 

 

    消息类型(大类)MsgType分为

        通知

        任务

        即时消息


    消息类型(小类)MsgBizType分为

        工作流

        预警

        即时消息

        办公消息

        催办

        后台事务消息

        协同办公

        人力资源

 

可以通过这个上面2个字段筛选出你想要的消息

 

removeMessage(String ID)

用于EAS消息中心主动删除第三方系统相应的消息记录,参数ID是WSMessage中的MsgID字段的值

这个方法是在删除消息的时候会调用。

 

updateMessage(String ID)

主要用于消息的状态更新同步,参数ID是WSMessage中的MsgID字段的值。

这个接口是当鼠标点击在某条消息(单条消息)上时改变消息状态的情况下被调用

 

 

updateMessages(String ids, MsgStatus state)

主要用于消息的状态更新同步,参数IDs

是多条消息的MsgID的值的集合,state是要设置消息的状态值,这个接口是在界面上按下“设置消息已读”或“未读”按钮时被调用。此接口不受WSConfig.xml配置文件控制。

 

addInitiatorMessage(WfrProcMessage wfrProcMessage)

流程状态改变时向第三方推送改流程实例的状态。此接口不受WSConfig.xml配置文件控制。

WfrProcMessage对象详解

    //流程编码

    private String procCode;

    //流程主题

private String procSubject;

//流程实例id

    private String procInstId;

    //流程状态

    private String procState; 

    //流程状态名称

    private String procStateName;

    //创建时间

    private Timestamp createdtime;

    //修改时间

    private Timestamp updateTime;

    //单据业务对象ID

    private String billID;

    //创建人

    private String initiator;

    //创建人用户编码

    private String initiatorNumber;

    //组织ID

    private String OrgID;

    //判断是否新增0-新增,1-修改

    private int isAdd;

addCompletedMessage(WfrAssignMessage wfrAssignMessage)

推送已完成的任务信息(已办任务)。此接口不受WSConfig.xml配置文件控制。

WfrAssignMessage对象详解

//任务id

    private String assignId;

    //任务标题

    private String assignSubject;

    //流程实例id

    private String procInstId;

    //任务状态

    private String state;

    //任务状态名称

    private String stateName;

    //任务接收时间

private Timestamp acceptTime;

    //任务处理时间

    private Timestamp dealTime;

    //单据业务对象ID

    private String billID;

    //发起人

    private String initiator;

    //发起人编码

    private String initiatorNumber;

    //处理人

    private String handler;

    //处理人编码

    private String handlerNumber;

    //组织ID

private String OrgID;

//上下文

    private Context ctx;

 

第三方系统里打开审批界面

访问http://ip:端口/easweb/webviews/workflow/transferApprove.jsp?AssignmentId=待办任务id就可以打开对应的审批界面


第三方系统里打开任务对应的单据界面

1、      检查webviewa\workflow\目录下是否包含transferBillInfo.jsp,没有的话transferBillInfo.jsp放到webviewa\workflow\目录下(附件中已经提供)。

2、      访问http://ip:端口/easweb/webviews/workflow/transferBillInfo.jsp?AssignmentId=已办任务id就可以查看已办任务对应的单据界面

单点登录配置


Eg:单点登录文档附件提供参考

http://<ip>:<port>/portal/index2sso.jsp?username="+username+"&password="+password+"&redirectTo=/easweb/webviews/workflow/transferApprove.jsp?AssignmentId="+任务id

 

如果弹出登录重复提示导致跳转失败可在url后面加上参数 isNotCheckRelogin=true


学到了,感谢呀~

EAS消息主动向第三方系统推送消息

配置文件详细说明1.文件路径eas \server\profiles\server1\config\portalConfig下的easWebConfig.xml和WSConfig.xml2.启用与第三方系统消...
点击下载文档
分享:
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息