perf(工作流模块): 优化 流程详情信息查询接口,减少模型信息查询次数。

This commit is contained in:
konbai
2023-01-15 17:26:40 +08:00
parent eff0a8d74e
commit 3f3768ca45
2 changed files with 20 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
package com.ruoyi.flowable.utils;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.*;
@@ -26,6 +27,16 @@ public class ModelUtils {
return bpmnXMLConverter.convertToBpmnModel(new StringStreamSource(xml), false, false);
}
/**
* bpmnModel转xml字符串
*
* @param bpmnModel bpmnModel对象
* @return xml字符串
*/
public static String getBpmnXmlStr(BpmnModel bpmnModel) {
return StrUtil.utf8Str(getBpmnXml(bpmnModel));
}
/**
* bpmnModel转xml对象
*