REQ-3383-调整中止流程添加意见代码

This commit is contained in:
yangqicheng 2024-12-18 11:06:44 +08:00
parent 0516396ea5
commit 04f883be8a

View File

@ -114,16 +114,10 @@ public class CustomAbortProcessInstanceCmd extends AbstractCommand<Void> impleme
// 添加自定义的节点,用于展示最后的操作
TaskEntity task = createVirtualTask(commandContext, extAxHiTaskInstService, processInstanceId,
nodeName, NODE_ABORT.getType(), null, assigner, ABORTED.getStatus(), new AddComment(reason));
nodeName, NODE_ABORT.getType(), advice, assigner, ABORTED.getStatus(), new AddComment(reason));
runtimeService.setVariable(task.getProcessInstanceId(), TASK_COMPLETE_OPERATION_TYPE + task.getId(), ABORTED);
batchAddAttachment(commandContext, task.getProcessInstanceId(), task, attachmentList, assigner);
//添加中止意见
if (StringUtils.hasLength(advice)) {
Authentication.setAuthenticatedUserId(assigner.buildAssigneeId());
addComment(commandContext, task, COMMENT_TYPE_ADVICE, advice);
Authentication.setAuthenticatedUserId(null);
}
completeVirtualTask(commandContext, task);
return null;
}