| | |
| | | if (Func.isEmpty(variables)) { |
| | | variables = Kv.create(); |
| | | } |
| | | /* |
| | | String programIds = null; |
| | | if(variables.containsKey(FlowContants.PROGRAM_IDS_KEY)){ |
| | | programIds = variables.get("programIds").toString(); |
| | | runtimeService.setVariable(taskId, FlowContants.PROGRAM_IDS_KEY, programIds); |
| | | } |
| | | if(StringUtils.isNotEmpty(programIds)) { |
| | | //这已经没用了,直接使用临时文件 |
| | | processProgRefService.addRelations(processInstanceId,Func.toLongList(programIds)); |
| | | } |
| | | */ |
| | | |
| | | //加入审批用户 |
| | | variables.put("approveUserNickName",AuthUtil.getNickName()); |
| | | variables.put(FlowContants.LAST_STEP_USER_NICKNAME,AuthUtil.getNickName()); |
| | | |
| | | if(variables.containsKey("assignee")){ |
| | | addApproveRecord(taskId,processInstanceId,comment,variables); |
| | | //指定了下一步执行人 |
| | | taskService.complete(taskId, variables); |
| | | |
| | | //在编制任务时,创建节点(没有节点则创建,有就直接使用 |
| | | if(task.getTaskDefinitionKey().equals("programmingTask") && "Y".equals(operateResult)) { |
| | | |
| | | ncNodeAutoCreateService.createNodeTreeWithProgram(flowCommonService.getProgramProperties(processInstanceId)); |
| | | } |
| | | |
| | | //指定了下一步执行人 |
| | | taskService.complete(taskId, variables); |
| | | |
| | | return R.success("流程提交成功"); |
| | | }else { |
| | | // 完成任务,给默认用户 |