Shell
Description
Shell is a Process Entry in the Scripting Plugin for Process Studio Processes. Use the Shell process entry to execute a shell script on the host where the process is running. The Shell process entry is platform agnostic; you can use a batch file in windows, shell script in UNIX, and so on. When you use a Shell process entry, Process Studio makes a Java call to execute a program in a specified location. The return status is provided by the operating system call. For example, in batch scripting a return value of 1 indicates that the script was successful; a return value of 0 (zero) indicates that it was unsuccessful. You can pass command line arguments and set up logging for the Shell process entry.
Configurations
No. | Field Name | Description |
---|---|---|
1 | Process Entry name | Specify a unique name for the process entry, on the workspace area. A process entry can be placed on the canvas several times; and each instance of the entry must have a unique name. |
2 | Insert script | Enable this checkbox when you want to execute the script in the Script tab instead of executing the Script file name . This is also useful, when you want to execute operating system commands like dir, ls or ipconfig without giving a specific path. This option creates a temporary script in the working directory and executes it. Note: Variables are resolved within the script when given. |
3 | Script file name | The filename of the shell script to start, should include full path else ${user.dir} is used as path. |
4 | Working directory | Specify the directory that will be used as working directory for the shell script. The working directory only becomes active when the shell script starts so "Filename" should still include the full path to the script. When the field is left empty or the working directory is invalid ${user.dir} will be used as working directory. |
5 | Specify log file | Enable to specify a separate logging file for the execution of this workflow |
6 | Append logfile | Enable to append to the logfile as opposed to creating a new one |
7 | Name of log file | The directory and base name of the log file (for example C:\logs) |
8 | Extension of the log file | The filename extension (for example: log or txt) |
9 | Include date in filename? | Adds the system date to the filename. (_20051231) |
10 | Include time in filename? | Adds the system time to the filename. (_235959) |
11 | Loglevel | Specify the logging level for the execution of the shell. |
12 | Copy previous results to arguments? | The results from a previous workflow can be sent to the shell script using the "Copy rows to result" step. (as arguments) |
13 | Execute once for every input row | This implements looping. If the previous process entry returns a set of result rows, you can have this shell script executed once for every row found. One row is passed to this script at every execution in combination with the copy previous result to arguments. The values of the corresponding result row can then be found on command line argument $1, $2, ... (%1, %2, %3, ... on Windows) |
14 | Arguments table | Specify the strings to use as arguments for the shell script. |