refactor(工作流流程): 新增读取xml文件接口,替换原流程定义中的接口。

This commit is contained in:
konbai
2022-10-16 02:40:59 +08:00
parent 5720cd93ab
commit 5eeac80ea8
5 changed files with 39 additions and 3 deletions

View File

@@ -43,6 +43,12 @@ public interface IWfProcessService {
*/
void startProcessByDefKey(String procDefKey, Map<String, Object> variables);
/**
* 读取xml文件
* @param processDefId 流程定义ID
*/
String queryBpmnXmlById(String processDefId);
/**
* 查询流程任务详情信息
* @param procInsId 流程实例ID

View File

@@ -189,6 +189,20 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
}
}
/**
* 读取xml文件
* @param processDefId 流程定义ID
*/
@Override
public String queryBpmnXmlById(String processDefId) {
InputStream inputStream = repositoryService.getProcessModel(processDefId);
try {
return IoUtil.readUtf8(inputStream);
} catch (IORuntimeException exception) {
throw new RuntimeException("加载xml文件异常");
}
}
/**
* 流程详情信息
*