fix - 处理发起人的 operationDesc 被意外赋值

This commit is contained in:
wangli 2024-08-09 09:29:22 +08:00
parent 90a3c0cf71
commit f3e242577a
2 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,8 @@ public class CustomApproveTaskCmd extends AbstractCommand<Void> implements Seria
this.approver = dto.getApprover();
this.nextApprover = dto.getNextApprover();
this.nodeTypes = dto.getNodeTypes();
if (StringUtils.hasText(operationDesc)) {
// 这里的不能直接使用字符串的比较因为外部可能传入空字符串比如发起人的通过时就是传入的空字符串
if (Objects.nonNull(operationDesc)) {
this.operationDesc = operationDesc;
}
}

View File

@ -44,7 +44,8 @@ public class AsyncApproveTaskJobHandler extends AbstractExecuteWithLockJobHandle
}
CustomApproveTaskCmd command = new CustomApproveTaskCmd(dto);
if (Objects.equals(task.getTaskDefinitionKey(), NODE_STARTER.getType())) {
command = new CustomApproveTaskCmd(dto);
// 这里的 operationDesc 设置为 是为了在日志中不显示已通过
command = new CustomApproveTaskCmd(dto, "");
}
processEngineConfiguration.getCommandExecutor().execute(command);
}