ExecuteCommand
|
Group |
|
|
Class Name |
com.ebd.hub.datawizard.util.ExecuteCommand |
|
Function |
This class is able to invoke commands at operating system level. |
|
Configuration File |
sample_execute_command.properties |
Description
This class is able to invoke commands at the operating system level. The field Additional parameters has to contain the path to a properties file.
Parameter Description
|
Parameter Name |
Description |
|
cmd |
Command to be executed, for example, ls. |
|
param.<x> |
Parameters for the command. The index is 1. If param.1=-l and the command is ls, ls -l will be executed. |
|
working.dir |
Working directory in which the command will be executed. If no directory is set, the installation directory of the Integration Server will be used. |
|
max.time |
Maximal waiting time for the command before an error is reported. |
|
error |
An error is reported, if the execution of the command delivers the specified error to stdout. The prefix regex:, allows the usage of a regular expression. |
|
success |
Return value of the command in case of success. If nothing is defined, return value 0 will be expected. |
|
env.<VARNAME> |
Environment variable, which shall be set before the execution of the command. The parameter value env.MY_VAR=xyz sets environment variable MY_VAR with value xyz. |
Note: You can use placeholder for the values of parameters cmd and param.<x>:
Variables in syntax @VAR_NAME@
System constants (not profile constants) in syntax %CONST_NAME%
The placeholders <file>, <basefile>, <file-prefix> and <file-out>
Example
Additional parameter: ./conf/test.properties
#cmd=C:\\test.bat#param.1=#working.dir=#max.time=#error=#success=#env.XXX=Note: The file must be located in the subdirectory ./conf of the installation directory of the Integration Server.
mkdir test222Note: The file must be located in the working directory. Here, in the installation folder ./ of the Integration Server.