private CompositeInstanceFilter make_filter(EnvParams ep){
        CompositeInstanceFilter filter= new CompositeInstanceFilter();
        if(!(ep.compositeName==null)){
            filter.setCompositeName(ep.compositeName);
        }
        if(!(ep.minAbsolute==null)){
            filter.setMinCreationDate(ep.minAbsolute);
            if(ep.minRelativeToNowInMinutes!=0){
                logger.warn("minRelativeToNowInDays being ignored since an absoulte min date was provided");
            }
        }
        else{
            if(ep.minRelativeToNowInMinutes!=0){
                Calendar cal = Calendar.getInstance();
                cal.add(Calendar.MINUTE,ep.minRelativeToNowInMinutes);
                filter.setMinCreationDate(cal.getTime());
            }
        }
        if(!(ep.maxAbsolute==null)){
            filter.setMaxCreationDate(ep.maxAbsolute);
            if(ep.maxRelativeToNowInMinutes!=0){
                logger.warn("maxRelativeToNowInDays being ignored since an absoulte max date was provided");
            }
        }
        else{
            if(ep.maxRelativeToNowInMinutes!=0){
                Calendar cal = Calendar.getInstance();
                cal.add(Calendar.MINUTE,ep.maxRelativeToNowInMinutes);
                filter.setMaxCreationDate(cal.getTime());
            }
        }
        if(!(ep.state==null)){
            filter.setState(Integer.parseInt(ep.state));
        }
        //filter.setState(ep.state);
        logger.info("Getting instances for " + ep.name);
        return filter;
    }