由于群里有些朋友对这个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 ReturnVo<String> deploy(String modelId) {
ReturnVo<String> returnVo = new ReturnVo<>(ReturnCode.FAIL, "部署流程失败!");
if (StringUtils.isBlank(modelId)) {
returnVo.setMsg("模板ID不能为空!");
return returnVo;
}
try {
Model model = modelService.getModel(modelId.trim());
//到时候需要添加分类
String categoryCode = "1000";
BpmnModel bpmnModel = modelService.getBpmnModel(model);
//添加隔离信息
String tenantId = "flow";
//必须指定文件后缀名否则部署不成功
Deployment deploy = repositoryService.createDeployment()
.name(model.getName())
.key(model.getKey())
.category(categoryCode)
.tenantId(tenantId)
.addBpmnModel(model.getKey() + ".bpmn", bpmnModel)
.deploy();
returnVo.setData(deploy.getId());
returnVo.setMsg("部署流程成功!");
returnVo.setCode(ReturnCode.SUCCESS);
} catch (Exception e) {
e.printStackTrace();
returnVo.setMsg(String.format("部署流程异常!- %s", e.getMessage()));
}
return returnVo;
}
1420

被折叠的 条评论
为什么被折叠?



