From b2a82d5637f88751f67f137d2f5afcdc4016e2ac Mon Sep 17 00:00:00 2001 From: songgaoshuai <1742057357@qq.com> Date: Thu, 7 Dec 2023 18:14:42 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=B0=83=E6=95=B4=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=E5=AE=9E=E4=BE=8B=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflow/flowable/cmd/DeleteExecutionCmd.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/cmd/DeleteExecutionCmd.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/cmd/DeleteExecutionCmd.java index 698cebd6e..215d31023 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/cmd/DeleteExecutionCmd.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/flowable/cmd/DeleteExecutionCmd.java @@ -2,6 +2,7 @@ package org.dromara.workflow.flowable.cmd; import org.flowable.common.engine.impl.interceptor.Command; import org.flowable.common.engine.impl.interceptor.CommandContext; +import org.flowable.engine.impl.persistence.entity.ExecutionEntity; import org.flowable.engine.impl.persistence.entity.ExecutionEntityManager; import org.flowable.engine.impl.util.CommandContextUtil; @@ -12,7 +13,7 @@ import java.io.Serializable; * * @author may */ -public class DeleteExecutionCmd implements Command, Serializable { +public class DeleteExecutionCmd implements Command, Serializable { /** * 执行id @@ -24,9 +25,12 @@ public class DeleteExecutionCmd implements Command, Serializable { } @Override - public String execute(CommandContext commandContext) { + public Void execute(CommandContext commandContext) { ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager(); - executionEntityManager.delete(executionId); + ExecutionEntity entity = executionEntityManager.findById(executionId); + if (entity != null) { + executionEntityManager.deleteExecutionAndRelatedData(entity, "", false, false); + } return null; } }