| | |
| | | //监听器参数补全 |
| | | processStartBO.getVariable().put("category", processStartBO.getCategory()); |
| | | // 开启流程 |
| | | flowLongEngine.startInstanceById(flwProcess.getId(), creator, processStartBO.getVariable()).ifPresent(instance -> { |
| | | Optional<FlwInstance> flwInstanceOptional = flowLongEngine.startInstanceById(flwProcess.getId(), creator, processStartBO.getVariable()); |
| | | if(flwInstanceOptional.isPresent()){ |
| | | FlwInstance instance = flwInstanceOptional.get(); |
| | | //存储任务中心信息 |
| | | StateTaskCenter stateTaskCenter = new StateTaskCenter(); |
| | | stateTaskCenter.setId(IdUtils.simpleUUID()); |
| | |
| | | //保存version |
| | | stateProcessExtInstance.setProcessVersion(flwProcess.getProcessVersion()); |
| | | stateProcessExtInstanceService.save(stateProcessExtInstance); |
| | | }); |
| | | } |
| | | return true; |
| | | } |
| | | |