由于群里有些朋友对这个flowable还不是 很熟悉,在群里的小伙伴的建议下,师傅(小学生05101)制作一个开源的项目源码,一共大家学习和交流,希望对有帮助,少走弯路 如果有不懂的问题可以入群:633168411 里面都是一些热心肠的人。

工作流实战_05_flowable 流程定义的挂起与激活_用户名

项目地址

​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. 演示

工作流实战_05_flowable 流程定义的挂起与激活_git_02

2. 挂起与激活代码

public ReturnVo suspendOrActivateProcessDefinitionById(String processDefinitionId,int suspensionState) {
ReturnVo returnVo = null;
if (suspensionState == 1){
repositoryService.suspendProcessDefinitionById(processDefinitionId, true, null);
returnVo = new ReturnVo(ReturnCode.SUCCESS,"挂起成功");
}else {
repositoryService.activateProcessDefinitionById(processDefinitionId, true, null);
returnVo = new ReturnVo(ReturnCode.SUCCESS,"激活成功");
}
return returnVo;
}