feat:审批通过时,查询下一个执行节点,校验流程执行正确与否
This commit is contained in:
parent
33ab961629
commit
d41cce94cd
|
@ -856,6 +856,10 @@ public class BpmnModelUtils {
|
|||
if (targetElement == null) {
|
||||
continue;
|
||||
}
|
||||
// 如果是结束节点,直接返回
|
||||
if (targetElement instanceof EndEvent) {
|
||||
break;
|
||||
}
|
||||
// 情况一:处理不同类型的网关
|
||||
if (targetElement instanceof Gateway) {
|
||||
Gateway gateway = (Gateway) targetElement;
|
||||
|
|
|
@ -595,8 +595,11 @@ public class BpmTaskServiceImpl implements BpmTaskService {
|
|||
if (CollUtil.isNotEmpty(allNextAssignees)) {
|
||||
// 获取实例中的全部节点数据,避免后续节点的审批人被覆盖
|
||||
hisProcessVariables.putAll(allNextAssignees);
|
||||
// 设置流程变量,审批人自选
|
||||
newVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_APPROVE_USER_SELECT_ASSIGNEES, hisProcessVariables);
|
||||
runtimeService.setVariables(processInstance.getProcessInstanceId(), variables);
|
||||
// 设置流程变量,发起人自选,后续的节点或者回退后再或者驳回重新发起的场景可能存在发起人自选或者审批人自选,所以中两个变量值要保持一致,否则会查询不到审批人
|
||||
newVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_SELECT_ASSIGNEES, hisProcessVariables);
|
||||
runtimeService.setVariables(processInstance.getProcessInstanceId(), newVariables);
|
||||
}
|
||||
return newVariables;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue