update(REQ-2324) - 解决设置审批人如果为空,则自动驳回

This commit is contained in:
wangli 2024-05-31 16:56:34 +08:00
parent 7f0a1b3c20
commit 1628402bd5

View File

@ -45,6 +45,9 @@ public class BpmnProcessActivityServiceImpl implements BpmnProcessActivityServic
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
if (CollectionUtils.isEmpty(dto.getAssigners())) {
Execution execution = runtimeService.createExecutionQuery().executionId(dto.getTriggerId()).singleResult();
if (Objects.isNull(execution)) {
throw new WorkflowEngineException(ACTIVITY_TRIGGER_NOT_EXISTS, dto.getTriggerId());
}
commandExecutor.execute(new CustomAbortProcessInstanceCmd(execution.getProcessInstanceId(), null, "业务未指定审批人", extAxHiTaskInstService));
return;
}