天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2812|回复: 0

[流程] 流程结束,发送通知给表单发起人或者指定用户(流程 发送 消息 用户)

[复制链接]
karrman 发表于 2016-7-14 15:01:33 | 显示全部楼层 |阅读模式
Q:流程结束,发送通知给表单发起人或者指定用户?
A:如果发送给流程发起人,则可以在最后一个流程节点-通知-提交时触发,勾选【启动】,选择表单发起人,选择发送的摘要;如图,
    如果发送全公司,或者指定用户,则需要在流程最后一个节点到完成的先,路径执行脚本中,参考如下脚本
  1. (function(){
  2.         var userids=getCurrentDocument().getItemValueAsString("抄送人员");//表单,获取接收人的值
  3.         var touser="";
  4.         if(userids!=""&&userids!=null){
  5.                userids = userids.split(';');
  6.                     for (var i=0; i < userids.length; i++ ) {
  7.                     var touserid=userids[i];
  8.                         touser+=getUserById(touserid).getLoginno()+"|";
  9.                 }
  10.           touser=touser.substring(0,touser.length-1);

  11.         }
  12.         var formid=getCurrentDocument().getFormid();
  13.         var applicationId=getApplication();
  14.         var domainId=getDomainid();
  15.         var docid=getCurrentDocument().getId();
  16.         var request = $WEB.getParamsTable().getHttpRequest();//获取当前request
  17.         //如果服务器本身就可以访问,就可以通过函数获取
  18.         var url0="http://"+request.getServerName()+":"+request.getServerPort()+getContextPath();
  19.         var url1="http://dali.hengxinglvyou.com/obpm"+"/portal/dynaform/document/view.action?_docid="+docid+"&_formid="+formid+"&application="+applicationId;
  20.         //打开的url需要转码
  21.         url1=encodeURIComponent(url1);

  22.         var url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8742f81683920a60&redirect_uri="+url1+"&response_type=code&scope=snsapi_base&state="+domainId+"#wechat_redirect
  23.         return "";
  24.    })()
复制代码
1.jpg

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 02:57

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表