@Override
  public Collection<ProcessInstanceSummary> getProcessInstances(
      List<Integer> states, String filterText, int filterType, String initiator) {
    Collection<ProcessInstanceDesc> result = null;
    if (filterType == 0) {
      // search by process id
      result = dataService.getProcessInstancesByProcessId(states, filterText, initiator);
    } else if (filterType == 1) {
      // search by process name
      result = dataService.getProcessInstancesByProcessName(states, filterText, initiator);
    } else {
      result = dataService.getProcessInstances(states, initiator);
    }

    return ProcessInstanceHelper.adaptCollection(result);
  }
 public Collection<ProcessInstanceSummary> getProcessInstances() {
   return ProcessInstanceHelper.adaptCollection(dataService.getProcessInstances());
 }