07.flowable 流程定义查看流程图和xml

志不强者智不达,言不信者行不果。这篇文章主要讲述07.flowable 流程定义查看流程图和xml相关的知识,希望能为你提供帮助。


?
1、演示

07.flowable 流程定义查看流程图和xml

文章图片

2、代码分享
public void processFile(@PathVariable String id, @PathVariable String type, HttpServletResponse response)
try
byte[] b = null;
ProcessDefinitionVo pd = flowableProcessDefinitionService.getById(id);
if (pd != null)
if (type.equals("xml"))
response.setHeader("Content-type", "text/xml; charset=UTF-8");
InputStream inputStream = repositoryService.getResourceAsStream(pd.getDeploymentId(), pd.getResourceName());
b = IoUtil.readInputStream(inputStream, "image inputStream name");
else
response.setHeader("Content-Type", "image/png");
InputStream inputStream = repositoryService.getResourceAsStream(pd.getDeploymentId(), pd.getDgrmResourceName());
b = IoUtil.readInputStream(inputStream, "image inputStream name");

response.getOutputStream().write(b);

catch (Exception e)
LOGGER.error("ApiFlowableModelResource-loadXmlByModelId:" + e);
e.printStackTrace();





【07.flowable 流程定义查看流程图和xml】


    推荐阅读