public List searchProcessInstances(PageRoll pageRoll, ProcessInstanceData data) {
   // TODO Auto-generated method stub
   // 未完待续
   pageRoll.setSearchSQL("from ProcessInstanceData");
   pageRoll.setCountSQL("select count(*) from ProcessInstanceData");
   return processInstancePersistence.search(pageRoll);
 }
 public List getInstanceList(String[] ids) {
   // TODO Auto-generated method stub
   List list = new ArrayList();
   for (int i = 0; i < ids.length; i++) {
     list.add(processInstancePersistence.retrieve(ids[i]));
   }
   return list;
 }
  /**
   * 查询工作流模板。 通过condition拼出查询条件,利用pageRoll进行分页查询
   *
   * @param pageRoll 分页状态容器
   * @param condition 查询条件容器
   */
  public List<ProcessInstanceData> search(PageRoll pageRoll, JSONObject condition) {
    // 首先根据condition拼出where语句
    String processName = condition.getString("processName");
    String processURL = condition.getString("processURL");
    String where = " where 1>0";
    if (processName != null && processName.trim().length() > 0) {

      where = where + " and processName like '%" + processName + "%'";
    }

    if (processURL != null && processURL.trim().length() > 0) {
      where = where + " and processURL like '%" + processURL + "%'";
    }

    String countSQL = "select count(*) from ProcessData" + where;
    String selectSQL = "from ProcessInstanceData " + where;
    pageRoll.setCountSQL(countSQL);
    pageRoll.setSearchSQL(selectSQL);
    List<ProcessInstanceData> processList = processInstancePersistence.search(pageRoll);
    // 最后查询返回值
    return processList;
  }
 public void updateProcessInstance(ProcessInstanceData data) {
   // TODO Auto-generated method stub
   processInstancePersistence.update(data);
 }
 public void deleteProcessInstances(String[] ids) {
   // TODO Auto-generated method stub
   processInstancePersistence.delete(ids);
 }