mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 18:15:56 +08:00
update 调整流程实例删除
This commit is contained in:
parent
d998971d18
commit
b2a82d5637
@ -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.Command;
|
||||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
|
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.persistence.entity.ExecutionEntityManager;
|
||||||
import org.flowable.engine.impl.util.CommandContextUtil;
|
import org.flowable.engine.impl.util.CommandContextUtil;
|
||||||
|
|
||||||
@ -12,7 +13,7 @@ import java.io.Serializable;
|
|||||||
*
|
*
|
||||||
* @author may
|
* @author may
|
||||||
*/
|
*/
|
||||||
public class DeleteExecutionCmd implements Command<String>, Serializable {
|
public class DeleteExecutionCmd implements Command<Void>, Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 执行id
|
* 执行id
|
||||||
@ -24,9 +25,12 @@ public class DeleteExecutionCmd implements Command<String>, Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String execute(CommandContext commandContext) {
|
public Void execute(CommandContext commandContext) {
|
||||||
ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
|
ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
|
||||||
executionEntityManager.delete(executionId);
|
ExecutionEntity entity = executionEntityManager.findById(executionId);
|
||||||
|
if (entity != null) {
|
||||||
|
executionEntityManager.deleteExecutionAndRelatedData(entity, "", false, false);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user