    public List<BpelProcess> markForDehydration(List<BpelProcess> runningProcesses) {
        ArrayList<BpelProcess> ripped = new ArrayList<BpelProcess>();
        if (_processMaxAge > 0) {
            long now = System.currentTimeMillis();
            for (BpelProcess process : runningProcesses) {
                if (now - process.getLastUsed() > _processMaxAge) {
                    ripped.add(process);
                }
            }
        }
        if (runningProcesses.size() - ripped.size() > _processMaxCount) {
            runningProcesses.removeAll(ripped);
            Collections.sort(runningProcesses, new Comparator<BpelProcess>() {
                public int compare(BpelProcess p1, BpelProcess p2) {
                    if (p1.getLastUsed() > p2.getLastUsed()) return 1;
                    if (p1.getLastUsed() < p2.getLastUsed()) return -1;
                    return 0;
                }
            });
            for (int m = _processMaxCount; m < runningProcesses.size(); m++) {
                ripped.add(runningProcesses.get(m));
            }
        }
        return ripped;
    }

    public List<BpelProcess> markForDehydration(List<BpelProcess> runningProcesses) {
        ArrayList<BpelProcess> ripped = new ArrayList<BpelProcess>();
        if (_processMaxAge > 0) {
            long now = System.currentTimeMillis();
            for (BpelProcess process : runningProcesses) {
                if (now - process.getLastUsed() > _processMaxAge) {
                    ripped.add(process);
                }
            }
        }
        if (runningProcesses.size() - ripped.size() > _processMaxCount) {
            runningProcesses.removeAll(ripped);
            Collections.sort(runningProcesses, new Comparator<BpelProcess>() {
                public int compare(BpelProcess p1, BpelProcess p2) {
                    if (p1.getLastUsed() > p2.getLastUsed()) return -1;
                    if (p1.getLastUsed() < p2.getLastUsed()) return 1;
                    return 0;
                }
            });
            for (int m = _processMaxCount; m < runningProcesses.size(); m++) {
                ripped.add(runningProcesses.get(m));
            }
        }
        return ripped;
    }
