From 345f55898de1f78742ee66c619b39209a177100c Mon Sep 17 00:00:00 2001 From: wangli <274027703@qq.com> Date: Thu, 11 Dec 2025 15:38:52 +0800 Subject: [PATCH] =?UTF-8?q?fix=20-=20=E4=BF=AE=E5=A4=8D=E9=A9=B3=E5=9B=9E?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=AF=BC=E8=87=B4=E5=8D=A1=E7=89=87=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/engine/cmd/CustomRejectionTaskCmd.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomRejectionTaskCmd.java b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomRejectionTaskCmd.java index b23414126..abb90bf2b 100644 --- a/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomRejectionTaskCmd.java +++ b/workflow-engine-core/src/main/java/cn/axzo/workflow/core/engine/cmd/CustomRejectionTaskCmd.java @@ -17,6 +17,8 @@ import org.flowable.task.api.Task; import org.flowable.task.api.history.HistoricTaskInstance; import org.flowable.task.api.history.HistoricTaskInstanceQuery; import org.flowable.task.service.impl.persistence.entity.TaskEntity; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.Serializable; import java.util.HashMap; @@ -28,6 +30,7 @@ import static cn.axzo.workflow.common.constant.BpmnConstants.CLOSE_PROCESS_ASSIG import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_DELETE_PROCESS_FLAG; import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_PROCESS_DELETE_REASON; import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_PROCESS_TYPE_REJECT; +import static cn.axzo.workflow.common.constant.BpmnConstants.INTERNAL_TASK_RELATION_ASSIGNEE_INFO; import static cn.axzo.workflow.common.constant.BpmnConstants.SKIP_MQ; import static cn.axzo.workflow.common.constant.BpmnConstants.TASK_COMPLETE_OPERATION_TYPE; import static cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum.DELETED; @@ -44,7 +47,7 @@ import static cn.axzo.workflow.core.engine.cmd.helper.CustomTaskHelper.validTask * @since 2024/1/4 13:36 */ public class CustomRejectionTaskCmd extends AbstractCommand implements Serializable { - + private static final Logger log = LoggerFactory.getLogger(CustomRejectionTaskCmd.class); private final String taskId; private final String advice; private String operationDesc; @@ -101,10 +104,13 @@ public class CustomRejectionTaskCmd extends AbstractCommand implements Ser validTask(historicTaskInstance, task, approver, nodeTypes); + BpmnTaskDelegateAssigner originAssignee = BpmnTaskDelegateAssigner.toObjectCompatible(task.getVariable(INTERNAL_TASK_RELATION_ASSIGNEE_INFO + task.getId())); + log.info("origin assignee is : {}", JSON.toJSONString(originAssignee)); + task.setTransientVariable(TASK_COMPLETE_OPERATION_TYPE + task.getId(), DELETED.getStatus()); TaskEntity virtualTask = createVirtualTask(commandContext, extAxHiTaskInstService, task.getProcessInstanceId(), task.getName(), task.getTaskDefinitionKey(), advice, - Objects.equals(operationDesc, "自动驳回") ? null : approver, REJECTED.getStatus(), + Objects.equals(operationDesc, "自动驳回") ? null : Objects.isNull(originAssignee) ? approver : originAssignee, REJECTED.getStatus(), new AddComment(operationDesc)); virtualTask.setTransientVariable(SKIP_MQ, true);