Aspects of the environment within which the external application will be run are configured under the Environment tab.
Environment variables that should be present for the external application when it executes can be created here, and default values set. In the example shown in figure 12.7, an environment variable named "HELLO" with value "hello world" would be present in the execution environment of the external application.
The Working directory setting specifies where temporary files should be created.
- Default temp-dir
- Temporary files will be placed under the directory specified by the
java.io.tmpdirsetting for the system.
- Shared temp-dir
- Temporary files will be placed under the directory you specify. The files will be accessible to all execution nodes and the master server without needing to be moved between machines.
To be available to select, a directory must be:
- Already configured as an Import/export directory, as described in Accessing files on, and writing to, areas of the server filesystem.
- A shared directory, accessible by all machines where the external application will be executed.
Grid environments: For an external application to be executable on grid nodes, the Shared temp-dir option must be chosen for the working directory.
Job node setups: For an external applications to run on job nodes, either Working directory option is fine. However, if the directory specified by java.io.tmpdir is not an area shared between machines, and it usually is not, choosing Default temp-dir means that files will need to be moved between the master and job nodes.
When the Execute as master process option is enabled, the command line application will be executed on the master machine of a job node or grid setup. Export, import and post-processing steps are still run on the execution environment selected by the user when launching the external application. This setting has no effect for single server setups, where all execution happens on the same system.
With this option unselected, all stages of the external application are run on the execution environment selected when launching the external application. This is the default situation.
Execute as master process is not recommended for use with memory or cpu intensive tasks as the command line application will be launched on the master system without consideration of how busy that system is, or what processing capabilities it has.
For grid setups: Whether or not the Execute as master process option is enabled, export, import and post-processing steps will be run on a grid node if a grid execution environment is selected when launching an external application. This is why the Working directory option must be set to Shared temp-dir when running an external application on a grid setup.