Scripting Entries
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.
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.
SQL is a Process Entry in the Scripting Plugin for Process Studio Processes. Use the SQL process entry to execute an SQL script. You can execute more than one SQL statement, as long as they are separated by semi-colons.
The SQL process entry is flexible; you can perform procedure calls, create and analyze tables, and more. Common uses associated with the SQL process entry include truncating tables, drop index, partition loading, refreshing materialized views, disabling constraints, disabling statistics, and so on.
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
Database Connection
The database connection to use.
3
SQL from file
Enable this option to load the SQL statement from a file given by the SQL filename
4
SQL filename
The filename for the file with SQL statements.
5
Send SQL as single statement?
Enable this option to not separate the statement by semicolons. This is often useful when a script is given or multiple statements should be processed and committed as one single statement.
6
Use variable substitution?
Enables variables to be used in the SQL Script.
7
SQL script
The SQL script to execute. Multiple statements can be separated by semicolons.
Java Script is a Process Entry in the Scripting Plugin for Process Studio Processes. JavaScript process entry to calculates a boolean expression. The result can be used to determine which step will be executed next. You can use functions, procedure calls, ANDs, ampersands, ORs, EQUALs, etc. The JavaScript process entry evaluates and returns a true or false.
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
Java Script
The result of a JavaScript process entry is either true or false. In other words, it needs to end with a boolean expression.
Here are a few possible evaluations to end your script with :
lines_input > 100 or
true or parent_process.getVariable("INPUT_DIRECTORY").equals("/tmp")