public int consume ( Map < String , String > initialVars ) { this . dataPipe = new DataPipe ( this ) ; // Set initial variables for ( Map . Entry < String , String > ent : initialVars . entrySet ( ) ) { dataPipe . getDataMap ( ) . put ( ent . getKey ( ) , ent . getValue ( ) ) ; } // Call transformers for ( DataTransformer dc : dataTransformers ) { dc . transform ( dataPipe ) ; } // Call writers for ( DataWriter oneOw : dataWriters ) { try { oneOw . writeOutput ( dataPipe ) ; } catch ( Exception e ) { //NOPMD log . error ( "Exception in DataWriter" , e ) ; } } return 1 ; }
Consumes a produced result . Calls every transformer in sequence then calls every dataWriter in sequence .