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

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

[性能] 获取当前人的问题

[复制链接]
an22291 发表于 2011-10-10 18:03:07 | 显示全部楼层 |阅读模式
在流程中,我能获取当前审批人吗?
bonnie 发表于 2011-10-10 18:09:47 | 显示全部楼层
可以啊!通过写脚本就可实现。
 楼主| an22291 发表于 2011-10-10 18:16:34 | 显示全部楼层
能告诉我那脚本怎么写吗?谢谢
bonnie 发表于 2011-10-10 18:17:12 | 显示全部楼层
function getProcessor(){
        var rtn = ""
        var doc = $CURRDOC.getCurrDoc();
        var processor = "";
        if(doc.getState() != null) {
                var actors = doc.getState().getActors();
               
                if (actors != null) {
                        for(var it = actors.iterator(); it.hasNext(); ) {
                                var actorrt = it.next();
                                if (actorrt.getIsprocessed()) {
                                        continue;
                                }
                                processor += actorrt.getName() + ',';
                        }
                        var index = processor.lastIndexOf(',');
                        processor = processor.slice(0, index);
                }
                rtn = processor;
        }
        return rtn;
}

本版积分规则

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

GMT+8, 2026-8-12 07:32

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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