VI Execute Process Object
The Visual Integrator (VI) Execute process object runs system commands as subprocesses.
These commands might retrieve external data or run other applications. The Execute process object does not process any data; it launches another application.
NOTE: Since the introduction of DI-Production, DI highly recommends using the Production Execute process node instead of the VI Execute process object. For more information, see Execute Process Node.
The Execute process object has three panes where you set attributes.
You set attributes for the Execute process object in the object attributes pane.
Attribute | Description |
---|---|
Output_File |
Specifies the output file to receive the output of each command. If not specified, the output is written to the VI logs tab. |
Append_Output |
Specifies to either append or clear the output file for each run.
|
Chdir |
Specifies a working directory for the commands run. If not specified, the commands are run using the VI working directory. |
Add_Environment | Specifies new or updated environment variables to set before running the given commands. Click on the ellipses to open a list editor This attribute is an array of strings of the format "environment variable=environment value". Existing environment variables that are not listed are not changed, and they are passed to the commands. (Available as of |
Echo |
Specifies whether or not commands are printed to the VI standard output as they run.
|
Error_Command |
Specifies an executable command to run when errors occur while running other commands. |
Commands (below) | See Commands Grid below. |
Each object has an area where you can enter comments.
It is a DI best practice to enter a note for every object in a VI script. You can set a VI preference to give a warning for each object without a note.
Enter commands for the Execute process object in the commands grid.
Specify one or more commands for the Execute node to run. The commands run sequentially. The Execute process object waits for all background processes to complete before finishing. If an error occurs, the executable command specified by the Error_Command attribute runs.
Keep the following in mind:
- Place a dash (-) in front of a command string to prevent it from ending upon failure.
- Place an ampersand (&) in front of a command to run that command as a background process, allowing the Execute object to continue on to the next command before this one completes. This allows commands to be run in parallel.
- Use the redirection character (>) to direct the output of the command to a file. Supply the file name after the redirection character. The redirection-and-append option (>>) is also supported.
- Enclose in quotation marks ("") any path, file name, or parameter that contains spaces.
- When running DIAL scripts within an Execute object, enclose in quotation marks any path, file name, or parameter that contains spaces. For example:
"C:\Program Files\Java\jre6\bin\java.exe" -jar C:\adtest\CRMC\dial.jar C:\adtest\CRMC\scard_xray_prnt.dial "$(start period)" "$(end period)" "$(print)"