提交 61c03636 编写于 作者: zhouweidong's avatar zhouweidong

还原处理连接角色逻辑

上级 b7b6645c
...@@ -523,7 +523,6 @@ public class WFCoreService ...@@ -523,7 +523,6 @@ public class WFCoreService
if(list.size()==0) if(list.size()==0)
return taskWays; return taskWays;
Task task=list.get(0); Task task=list.get(0);
LinkedHashMap activeData = (LinkedHashMap)runtimeService.getVariable(task.getExecutionId(),"activedata");
if((!StringUtils.isEmpty(task.getProcessDefinitionId()))&&(!StringUtils.isEmpty(task.getTaskDefinitionKey()))) { if((!StringUtils.isEmpty(task.getProcessDefinitionId()))&&(!StringUtils.isEmpty(task.getTaskDefinitionKey()))) {
UserTask userTask = wfModelService.getModelStepById(task.getProcessDefinitionId()).get(task.getTaskDefinitionKey()); UserTask userTask = wfModelService.getModelStepById(task.getProcessDefinitionId()).get(task.getTaskDefinitionKey());
//设置流程表单 //设置流程表单
...@@ -541,45 +540,10 @@ public class WFCoreService ...@@ -541,45 +540,10 @@ public class WFCoreService
way.setProcessinstancebusinesskey(processInstanceBusinessKey); way.setProcessinstancebusinesskey(processInstanceBusinessKey);
//设置流程交互表单 //设置流程交互表单
setTaskWayForm(sequenceFlow,way); setTaskWayForm(sequenceFlow,way);
String userIds = "";
String activeIds = "";
//过滤权限不足的用户
// String roles = (String) way.get("roles");
// String activeForm = (String) way.get("activeData");
String roles = null;
String activeForm = null;
String[] both = new String[]{};
if(activeForm != null){
String[] temp = activeForm.split(",");
int iMax = temp.length - 1;
for(int i = 0;i < temp.length ;i++){
if (iMax == -1){
break;
}
Object key = activeData.get(temp[i]);
if(!ObjectUtils.isEmpty(key)) {
activeIds += key;
if (i == iMax) {
break;
}
activeIds += ",";
}
}
if(activeIds.endsWith(",")){
activeIds = activeIds.substring(0,activeIds.lastIndexOf(","));
}
}
both = (String[]) ArrayUtils.addAll(both, activeIds.split(","));
userIds = getGroupUsers(roles,null);
both = (String[]) ArrayUtils.addAll(both, userIds.split(","));
if(Arrays.asList(both).contains(userId) || (roles == null && activeForm == null)){
taskWays.add(way); taskWays.add(way);
} }
} }
} }
}
return taskWays; return taskWays;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册