运行时查看流程图时会显示流程执行者等显示,波特图中也会显示,但是发通知时设置的通知接收者是不会显示的,如果需要显示如下实现
1.在process组件的onAfterAdvance事件中获取接收人并存储
public static void noticeFlowProcessAfterAdvance() { String sNoticeExecutors = ""; ProcessControl flowControl = (ProcessControl) ContextHelper.getActionContext().getParameter("control"); List<ProcessControlItem> listToItem = flowControl.getNotices();//获取当前环节流程时所有的通知 for(int j = 0;j<listToItem.size();j++){//遍历所有的通知获取对应的执行者拼接字符串 if(j != 0) sNoticeExecutors = sNoticeExecutors+","; ProcessControlItem to = listToItem.get(j); List<OrgUnit> list = to.getExecutors(); for(int i = 0;i<list.size();i++){ OrgUnit ect = list.get(i); String fname = ect.getFName(); if(i +1 == list.size()) sNoticeExecutors += fname; else sNoticeExecutors += fname+","; } } if(Utils.isNotEmptyString(sNoticeExecutors)){ String taskID = ProcessUtils.getTaskInProcessContext().getId();//获取当前任务ID String ksql = "update SA_Task task set task.sETField34 ='"+sNoticeExecutors+"' where task = '"+taskID+"'";//把拼接的执行者字符串复制给当前任务的sETField34 KSQL.executeUpdate(ksql, null, "/system/data", null); } }
2.修改/UI2/system/service/process/dialog/processChart.w文件文件,可以参考http://docs.wex5.com/bex5-process-processchart10021/中方式添加上sETField34,运行时就会把存储的接收通知的人显示出来,如下:
评一波