@Override
 public void deleteById(String id) {
   List<Flownode> list = flownodeService.getFlownodes(id);
   for (Flownode flownode : list) {
     log.info(
         this.getClass().getSimpleName()
             + " i==>go to flownodeService.deleteById  delete flownode by nodeid");
     flownodeService.deleteById(flownode.getId()); // 删除流程节点
   }
   log.info(
       this.getClass().getSimpleName()
           + " i==>go to flowRequestnameService.deleteByflowId delete flowRequestname by baseId");
   flowRequestnameService.deleteByflowId(id); // 删除流程自定义标题配置表
   log.info(
       this.getClass().getSimpleName()
           + " i==>go to flowMonitorService.deleteByworkflowId delete flowMonitor by baseId");
   flowMonitorService.deleteByworkflowId(id); // 删除流程监控信息
   super.deleteById(id);
 }
 @Override
 public String exportFlowbase(String flowbaseId) {
   Flowbase flowbase = flowbaseDao.getById(flowbaseId);
   if (flowbase == null) {
     log.warn(
         this.getClass().getSimpleName()
             + " w==> exportFlowbase, can not find flowbase by Id:["
             + flowbaseId
             + "]");
     throw new BpmException("bpm004", "导出流程失败,流程不存在");
   } else {
     Document doc = new Document();
     Element element = XmlUtil.getElementByBean(flowbase);
     if (element == null) {
       log.error(
           this.getClass().getSimpleName()
               + " e==> exportFlowbase,getElementByBean return null,flowbaseId:["
               + flowbaseId
               + "]");
       throw new BpmException("bpm005", "导出流程失败,流程为空");
     }
     element.addContent(flownodeService.exportFlowNodeElement(flowbaseId));
     // TODO 添加导出出口link功能
     doc.setRootElement(element);
     StringWriter sw = new StringWriter();
     XMLOutputter outp = new XMLOutputter();
     try {
       outp.output(doc, sw);
       return sw.toString();
     } catch (IOException e) {
       log.error(
           this.getClass().getSimpleName()
               + " e==> exportFlowbase,IOException,flowbaseId:["
               + flowbaseId
               + "]",
           e);
       throw new BpmException("bpm006", "导出流程失败,IOException");
     }
   }
 }