@RequestMapping("bpm-task-def-notice-removeNotice")
  public String removeNotice(@RequestParam("id") Long id) {
    BpmTaskDefNotice bpmTaskDefNotice = bpmTaskDefNoticeManager.get(id);
    Long bpmProcessId = bpmTaskDefNotice.getBpmProcess().getId();
    bpmTaskDefNoticeManager.remove(bpmTaskDefNotice);

    return "redirect:/bpm/bpm-task-def-notice-list.do?bpmProcessId=" + bpmProcessId;
  }
  @RequestMapping("bpm-task-def-notice-input")
  public String input(@RequestParam(value = "id", required = false) Long id, Model model) {
    if (id != null) {
      BpmTaskDefNotice bpmTaskDefNotice = bpmTaskDefNoticeManager.get(id);
      model.addAttribute("model", bpmTaskDefNotice);
    }

    List<BpmMailTemplate> bpmMailTemplates = bpmMailTemplateManager.getAll();
    model.addAttribute("bpmMailTemplates", bpmMailTemplates);

    return "bpm/bpm-task-def-notice-input";
  }
  @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;
  }