Execute Process Node
An Execute node is a Production process node that runs one or more command line commands along with any parameters as prescribed by the attributes.
Commands run in the order that they are listed whether listed in a file or individually.
The Execute node has three panes where you set attributes.
You set attributes for the Execute node in the node attributes pane.
Attribute | Description |
---|---|
Name | Specify a descriptive name for the node. Lower case names maximize usage of the available space. |
Failure type | Specify how to handle an Execute node failure:
|
File with list of commands (Required if no Commands attribute is set) |
Specify a text file that contains a header row followed by a list of commands. List each command on a separate line. To select the file, use the browse button (...) that appears when you click in the empty File with list of commands box. This attribute and the Commands attribute are mutually exclusive. See the NOTES for information about running these commands. |
Email Object for failure |
Select a predefined mailing list to send an email to if the node fails. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Email Object for success |
Select a predefined mailing list to send an email to if the node succeeds. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Email Object for warning |
Select a predefined mailing list to send an email to if the node generates a warning. The pull-down list is populated with items that can be found in Project Settings > Mailing Lists > Email Templates. |
Failure node | Select the next node upon failure. The pull-down list contains all nodes that are on the Task Flow. |
Success node | Select the next node upon successful completion. The next node automatically populates if a connecting line is set on the Task Flow. The pull-down list contains all nodes that are on the Task Flow. |
Working Directory |
Specifies the directory in which this node runs. If left blank, the Default Working Directory attribute that is set in the Start Control Node is used. When running a script, Production sets the working directory for the child process to the directory that contains the script, unless the node specifies a different directory. See Start Control Node. |
Default Working Directory |
Displays the Default Working Directory that is set the the Start Control Node. If a Default Working Directory is not specified, this attribute is blank. Applies to all nodes. See Start Control Node. |
External File Encoding |
Select the format for the node input files. If this attribute is blank, Workbench attempts to detect the type of encoding. This attribute is also used when saving log files. The encoding might need to be adjusted when using data with high bit Latin-1 characters or Unicode characters. |
Each node has an area where you can enter comments.
It is a DI best practice to enter a note for every node in a Production script. These notes can help you or a coworker understand the intent of the node and troubleshoot issues in the future.
Specify one or more commands to run in the Commands pane.
The Commands attribute is required if no File with list of commands attribute is set.
The Commands attribute supports additional control attributes for more detailed control of settings per command than if using the File with list of commands attribute:
- Disabled—Disables specific commands, which is useful for debugging. The default is no.
- Failure Type—Specifies how to handle an individual command failure: Fail, Never, or Warning. The default is Fail.
The Commands attribute and the File with list of commands attribute are mutually exclusive.
See the NOTES for information about running these commands.
-
The Execute node is, by design, separate from the rest of the external processes that are run by Production in Workbench. Since the Server Settings are not used for this node, you need to add entries to the system PATH environment variable to run spectre, integ, builder, and other applications. For example, in Windows, add to your system PATH environment variable, something similar to:
;C:\di\solution\diveline\bin;C:\di\soluion\executables
-
Occasionally there is a need to use system paths in Production scripts. For example, you might need to call a third party executable, or a script that does something to a file just created in a project. The macro $RESOLVE_PROJECT_PATH(<project_path>) can be used to resolve project paths into system paths.
For example, if you have a project myproject that is located at c:\projects\myproject and a directory in the project is called datafiles, you can include a command:
dir $RESOLVE_PROJECT_PATH(/datafiles)
When the command runs, it will be as if the entry were:
dir c:\projects\myproject\datafiles
This macro is only available in Execute process nodes—right-click in the Commands column to access Insert macro from the context menu.
- Production cannot open applications that require a window, since there is no desktop to handle the GUI.