perf(工作流模块): 优化 流程详情信息查询接口,减少模型信息查询次数。
This commit is contained in:
@@ -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对象
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user