public ProcessDTO findProcess(String processId) { if (processId == null) { logger.info("processId is null"); return null; } ProcessDTO processDto = new ProcessDTO(); BpmProcess bpmProcess = bpmProcessManager.get(Long.parseLong(processId)); String processDefinitionId = bpmProcess.getBpmConfBase().getProcessDefinitionId(); String processDefinitionName = bpmProcess.getName(); processDto.setProcessDefinitionId(processDefinitionId); processDto.setProcessDefinitionName(processDefinitionName); processDto.setConfigTask(Integer.valueOf(1).equals(bpmProcess.getUseTaskConf())); return processDto; }
@RequestMapping("bpm-task-def-notice-save") public String save( @ModelAttribute BpmTaskDefNotice bpmTaskDefNotice, @RequestParam("bpmProcessId") Long bpmProcessId, @RequestParam("bpmMailTemplateId") Long bpmMailTemplateId, RedirectAttributes redirectAttributes) { BpmTaskDefNotice dest = null; Long id = bpmTaskDefNotice.getId(); if (id != null) { dest = bpmTaskDefNoticeManager.get(id); beanMapper.copy(bpmTaskDefNotice, dest); } else { dest = bpmTaskDefNotice; } dest.setBpmProcess(bpmProcessManager.get(bpmProcessId)); dest.setBpmMailTemplate(bpmMailTemplateManager.get(bpmMailTemplateId)); bpmTaskDefNoticeManager.save(dest); messageHelper.addFlashMessage(redirectAttributes, "core.success.save", "保存成功"); return "redirect:/bpm/bpm-task-def-notice-list.do?bpmProcessId=" + bpmProcessId; }