由于群里有些朋友对这个flowable还不是 很熟悉,在群里的小伙伴的建议下,我师傅(小学生05101)制作一个开源的项目源码,一共大家学习和交流,希望对有帮助,少走弯路 如果有不懂的问题可以入群:633168411 里面都是一些热心肠的人。
项目地址 | https://gitee.com/lwj/flowable.git |
---|
代码分支 | flowable-base |
视频讲解地址 | https://space.bilibili.com/485524575/channel/detail?cid=94579 |
用户名 | 密码 |
---|
0000001 | test |
0000002 | test |
0000003 | test |
0000004 | test |
1. 演示
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();}}