/**
   * 查询KV事件流列表
   *
   * @return
   */
  public String init() {
    try {
      // 检查action传递过来的systemID合法性r
      if (form == null || StringUtil.isNullOrEmpty(form.getSystemID())) {
        return Action.ERROR;
      }
      int systemID = NumericUtil.tryParse(form.getSystemID(), -1);
      if (systemID <= 0) {
        return Action.ERROR;
      }
      form.setSystemID(form.getSystemID());
      form.setTips(form.getTips() == null ? "" : form.getTips());

      BaseDTO dto = new BaseDTO();
      dto.setSystemID(systemID);
      // 查询KV事件流列表
      this.eventFlowList = this.service.listKVEventFlow(dto);

      LogUtil.log(dto, "事件流-列表");

      return Action.SUCCESS;
    } catch (Exception e) {
      e.printStackTrace();
      return null;
    }
  }
  /**
   * 添加事件流
   *
   * @return
   */
  public String add() {
    int systemID = form.getSystemIDValue();
    String eventFlowName = form.getEventFlowName();
    String eventFlowDesc = form.getEventFlowDesc();
    String[] ids = form.getEventID();
    if (systemID == 0
        || null == eventFlowName
        || "".equals(eventFlowName.trim())
        || null == ids
        || "".equals(ids.length <= 0)) {
      return Action.SUCCESS;
    }

    List<EventFlowDTO> list = new ArrayList<EventFlowDTO>();
    EventFlowDTO dto = null;
    for (int i = 0, len = ids.length; i < len; i++) {
      dto = new EventFlowDTO();
      dto.setSystemID(systemID);
      dto.setEventFlowName(eventFlowName);
      dto.setEventFlowDesc(eventFlowDesc == null ? "" : eventFlowDesc);
      dto.setEventFlowStep(i + 1);
      dto.setFinalEventID(ids[i]);
      list.add(dto);
    }
    // 添加操作
    service.addKVEventFlow(list);

    LogUtil.log(dto, "事件流-添加");

    form.setTips("事件流添加成功!");
    return "success_redirect";
  }