update(REQ-2324) - 修复完成机器人节点时,支持不更新节点元信息

This commit is contained in:
wangli 2024-05-22 14:19:13 +08:00
parent c099845962
commit 098b09c3b9
2 changed files with 7 additions and 4 deletions

View File

@ -62,9 +62,11 @@ public class CustomCompleteDummyTaskCmd implements Command<Void>, Serializable {
taskService.saveTask(task);
}
Authentication.setAuthenticatedUserId("system");
CustomTaskHelper.addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, operationDesc);
Authentication.setAuthenticatedUserId(null);
if (StringUtils.hasText(operationDesc)) {
Authentication.setAuthenticatedUserId("system");
CustomTaskHelper.addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, operationDesc);
Authentication.setAuthenticatedUserId(null);
}
taskService.complete(task.getId());

View File

@ -645,7 +645,8 @@ public class BpmnProcessTaskServiceImpl implements BpmnProcessTaskService {
CommandExecutor commandExecutor = processEngineConfiguration.getCommandExecutor();
commandExecutor.execute(new CustomCompleteDummyTaskCmd(dto.getProcessInstanceId(), dto.getTaskId(),
Objects.isNull(dto.getRobotNode()) ? null : dto.getRobotNode().getFlowNodeName(),
dto.getRobotNode().getOperationDesc(), extAxHiTaskInstService));
Objects.isNull(dto.getRobotNode()) ? null : dto.getRobotNode().getOperationDesc(),
extAxHiTaskInstService));
}
@Override