REQ-2596-业务节点设置为指定审批人,还未指定审批人时,不进行自动过审操作

This commit is contained in:
yangqicheng 2024-07-15 14:35:52 +08:00
parent 6ea8b4b95b
commit ada988a158

View File

@ -31,6 +31,7 @@ import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_INITIATOR;
import static cn.axzo.workflow.common.constant.BpmnConstants.NO_ASSIGNEE;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_BUSINESS;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_EMPTY;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_STARTER;
@ -54,7 +55,8 @@ public class CheckApproverServiceImpl implements CheckApproverService {
FlowElement currentFlowElement = mainProcess.getFlowElement(delegateTask.getTaskDefinitionKey());
BpmnFlowNodeType currentNodeType = BpmnMetaParserHelper.getNodeType(currentFlowElement).orElse(NODE_EMPTY);
//业务节点,指定业务审批人,或者业务设置了审批人,也要参与自动过审,node_type为NODE_BUSINESS,节点元素类型为UserTask
if (!Objects.equals(currentNodeType, NODE_TASK) && !Objects.equals(currentNodeType, NODE_BUSINESS)) {
//业务节点审批人为空,或者人员未指定,此时不进行自动过审操作,需要再业务指定审批人后,再做自动过审动作
if (!Objects.equals(currentNodeType, NODE_TASK) && !Objects.equals(currentNodeType, NODE_BUSINESS) && !StringUtils.hasText(delegateTask.getAssignee()) && delegateTask.getAssignee().equals(NO_ASSIGNEE)) {
return exists.get();
}
Optional<BpmnButtonConf> optConfig = BpmnMetaParserHelper.getButtonConfig(mainProcess, delegateTask.getTaskDefinitionKey());