public void generate() throws XPathExpressionException, Exception {
        initGeneration();
        //-------------------------------------------------
        // DO THE WORK!!!!
        logger.debug("start generating data... ");

        //FIXME: parallel...
        // for each dataset: sample rows and write to the destination!....
        Iterator di = datasets.keySet().iterator();
        while (di.hasNext()) {
            Dataset item = (Dataset) datasets.get(di.next());
            //open destination
            Destination dx = item.getDestination();
            //logger.info("generating data for dataset '"+ item.getParams().get("ref").toString()+"' to destination '"+item.getDestination().getReference()+"'");
            dx.open();
            int numrows = Integer.parseInt((String)item.getParams().get("numrows"));
            logger.info("generating data for dataset '"+item.getRerefence()+"' to destination '"+dx.getReference()+"' ["+numrows+" entries]");
            for (int gg = 0 ; gg < numrows ; gg++) {
                RowData data = item.nextValues();
                dx.writeRow(data);
            }
            dx.close();
        }
        logger.info("all data generated.");
    }