public static void addEnvVarsFromContextForExec ( final ExecTask execTask , final Map < String , Map < String , String > > dataContext ) { final Map < String , String > environment = generateEnvVarsFromContext ( dataContext ) ; if ( null != environment ) { for ( final Map . Entry < String , String > entry : environment . entrySet ( ) ) { final String key = entry . getKey ( ) ; if ( null != key && null != entry . getValue ( ) ) { final Environment . Variable env = new Environment . Variable ( ) ; env . setKey ( key ) ; env . setValue ( entry . getValue ( ) ) ; execTask . addEnv ( env ) ; } } } }
Add embedded env elements for any included context data for the script