From 08585f7bc8c42918869535114d8eaa246433c1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Fri, 20 Dec 2024 10:36:21 +0800 Subject: [PATCH] =?UTF-8?q?update=20warm-flow=201.3.4=20=3D>=201.3.5=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=81=E7=A8=8B=E5=9B=BE=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/FlwDefinitionServiceImpl.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwDefinitionServiceImpl.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwDefinitionServiceImpl.java index 0f3286045..d1ccbbedf 100644 --- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwDefinitionServiceImpl.java +++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/service/impl/FlwDefinitionServiceImpl.java @@ -16,15 +16,11 @@ import org.dom4j.io.XMLWriter; import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.StreamUtils; import org.dromara.common.core.utils.StringUtils; -import org.dromara.common.core.utils.reflect.ReflectUtils; import org.dromara.common.mybatis.core.page.PageQuery; import org.dromara.common.mybatis.core.page.TableDataInfo; import org.dromara.warm.flow.core.dto.FlowCombine; import org.dromara.warm.flow.core.entity.Definition; -import org.dromara.warm.flow.core.entity.Node; -import org.dromara.warm.flow.core.entity.Skip; import org.dromara.warm.flow.core.service.DefService; -import org.dromara.warm.flow.core.utils.FlowConfigUtil; import org.dromara.warm.flow.orm.entity.FlowDefinition; import org.dromara.warm.flow.orm.entity.FlowHisTask; import org.dromara.warm.flow.orm.mapper.FlowDefinitionMapper; @@ -97,15 +93,11 @@ public class FlwDefinitionServiceImpl implements IFlwDefinitionService { @Override public boolean importXml(MultipartFile file, String category) { try { - FlowCombine combine = FlowConfigUtil.readConfig(file.getInputStream()); + FlowCombine combine = defService.readXml(file.getInputStream()); // 流程定义 Definition definition = combine.getDefinition(); definition.setCategory(category); - // 所有的流程节点 - List allNodes = combine.getAllNodes(); - // 所有的流程连线 - List allSkips = combine.getAllSkips(); - ReflectUtils.invoke(defService, "insertFlow", definition, allNodes, allSkips); + defService.importFlow(combine); } catch (Exception e) { log.error("导入流程定义错误: {}", e.getMessage(), e); throw new RuntimeException(e);