/**
  * 删除流程
  *
  * @return
  */
 public String deleteProcess() {
   try {
     workflowManager.deleteProcess(deployId);
     result = "successful";
   } catch (Exception e) {
     e.printStackTrace();
   }
   return "result";
 }
  /**
   * 查询全部流程定义
   *
   * @return
   */
  public String getProcessDefinitionList() {
    List<ProcessDefinition> pd = workflowManager.getProcessDefinitions(page, rows);
    int total = workflowManager.getTotalSize();
    List<ProcessD> pd1 = new ArrayList<ProcessD>();
    ProcessD p = null;
    try {
      for (int i = 0; i < pd.size(); i++) {
        p = new ProcessD();
        BeanTools.copyProperties(p, (ProcessDefinition) pd.get(i));
        pd1.add(p);
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
    Map<String, Object> map = new HashMap<String, Object>();

    map.put("total", total);
    map.put("rows", pd1);
    resultObj = JSONObject.fromObject(map);
    return "datagrid";
  }
 /**
  * 部署流程
  *
  * @return
  */
 public String deployProcessReal() {
   try {
     if (workflowFile != null) {
       InputStream in = new FileInputStream(workflowFile);
       ZipInputStream zip = new ZipInputStream(in);
       workflowManager.deployProcess(zip);
       in.close();
       zip.close();
       result = "successful";
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return "workflowMgr";
 }
 public String deployProcess() {
   workflowManager.deployProcess();
   return "main";
 }