update - 完善推测时,计算节点最终的审批方式
This commit is contained in:
parent
02075100d9
commit
19a51ae430
@ -94,6 +94,8 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_PROCESS_AG
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.OLD_INTERNAL_INITIATOR;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.PENDING_TEMPLATE_VARIABLE;
|
||||
import static cn.axzo.workflow.common.constant.BpmnConstants.WORKFLOW_ENGINE_VERSION;
|
||||
import static cn.axzo.workflow.common.enums.ApprovalMethodEnum.autoPassed;
|
||||
import static cn.axzo.workflow.common.enums.ApprovalMethodEnum.autoRejection;
|
||||
import static cn.axzo.workflow.common.enums.ApprovalMethodEnum.human;
|
||||
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.AND;
|
||||
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.EXCEPTIONAL;
|
||||
@ -769,8 +771,19 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
|
||||
userTask, engineExecutionStartListener));
|
||||
node.setForecastAssigners(forecastAssigners);
|
||||
if (CollectionUtils.isEmpty(forecastAssigners)) {
|
||||
getApproverEmptyHandleType(userTask).ifPresent(emptyHandleType ->
|
||||
node.setNodeMode(EXCEPTIONAL));
|
||||
getApproverEmptyHandleType(userTask).ifPresent(emptyHandleType -> {
|
||||
switch (emptyHandleType) {
|
||||
case autoPassed:
|
||||
node.setApprovalMethod(autoPassed);
|
||||
break;
|
||||
case autoRejection:
|
||||
node.setApprovalMethod(autoRejection);
|
||||
break;
|
||||
default:
|
||||
node.setNodeMode(EXCEPTIONAL);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
} else if (i instanceof ServiceTask) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user