refactor(工作流流程): 新增读取xml文件接口,替换原流程定义中的接口。
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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文件异常");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 流程详情信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user