feat(REQ-5865) - 解决 triggerAsync 后,业务节点文案消失的问题

This commit is contained in:
wangli 2025-12-08 10:20:01 +08:00
parent 9a0945fac1
commit a49f9bad15
2 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,7 @@ public class CustomActivityTriggerCmd extends AbstractCommand<Void> implements S
return null; return null;
} }
addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, "已同意"); addComment(commandContext, task, COMMENT_TYPE_OPERATION_DESC, "已同意", true);
RuntimeService runtimeService = processEngineConfiguration.getRuntimeService(); RuntimeService runtimeService = processEngineConfiguration.getRuntimeService();
log.info("CustomActivityTriggerCmd triggerAsync"); log.info("CustomActivityTriggerCmd triggerAsync");
runtimeService.triggerAsync(dto.getTriggerId()); runtimeService.triggerAsync(dto.getTriggerId());

View File

@ -267,6 +267,7 @@ public class TaskEntityEventHandle implements EntityEventHandle<TaskEntity> {
update.setAdvice(advice.toString()); update.setAdvice(advice.toString());
} }
Object operationDesc = Optional.ofNullable(taskEntity.getTransientVariableLocal(COMMENT_TYPE_OPERATION_DESC)).orElse(taskEntity.getVariableLocal(COMMENT_TYPE_OPERATION_DESC)); Object operationDesc = Optional.ofNullable(taskEntity.getTransientVariableLocal(COMMENT_TYPE_OPERATION_DESC)).orElse(taskEntity.getVariableLocal(COMMENT_TYPE_OPERATION_DESC));
log.info("TaskEntityEventHandle#onDeleted processInstanceId: {}, operationDesc: {}", taskEntity.getProcessInstanceId(), operationDesc);
if (Objects.nonNull(operationDesc) && StringUtils.hasText(operationDesc.toString())) { if (Objects.nonNull(operationDesc) && StringUtils.hasText(operationDesc.toString())) {
update.setOperationDesc(Objects.nonNull(assignee) ? update.setOperationDesc(Objects.nonNull(assignee) ?
(StringUtils.hasText(assignee.getAssignerName()) ? assignee.getAssignerName() : "") + operationDesc (StringUtils.hasText(assignee.getAssignerName()) ? assignee.getAssignerName() : "") + operationDesc