项目地址 | https://gitee.com/lwj/flowable.git |
---|
代码分支 | flowable-base |
视频讲解地址 | https://www.bilibili.com/video/av78184848/ |
用户名 | 密码 |
---|
0000001 | test |
0000002 | test |
0000003 | test |
0000004 | test |
1. 演示


2. 代码分享
public ReturnVo<String> turnTask(TurnTaskVo turnTaskVo) {ReturnVo<String> returnVo = null;TaskEntityImpl currTask = (TaskEntityImpl) taskService.createTaskQuery().taskId(turnTaskVo.getTaskId()).singleResult();if (currTask != null) {//1.生成历史记录TaskEntity task = this.createSubTask(currTask, turnTaskVo.getUserCode());//2.添加审批意见this.addComment(task.getId(), turnTaskVo.getUserCode(), turnTaskVo.getProcessInstanceId(), CommentTypeEnum.ZB.toString(), turnTaskVo.getMessage());taskService.saveTask(task);taskService.complete(task.getId());//3.转办taskService.setAssignee(turnTaskVo.getTaskId(), turnTaskVo.getTurnToUserId());taskService.setOwner(turnTaskVo.getTaskId(), turnTaskVo.getUserCode());returnVo = new ReturnVo<>(ReturnCode.SUCCESS, "转办成功");} else {returnVo = new ReturnVo<>(ReturnCode.FAIL, "没有运行时的任务实例,请确认!");}return returnVo;}