SystemCallResponse

Configuration file

sample_system_call_response.properties

Class name

com.ebd.hub.datawizard.customresp.SystemCallResponse

Description


This class executes an operating system call with optional parameters. The field Additional parameters has to contain the path to a properties file.

If the Integration Server runs as a Windows service, there are no environment parameters nor a command processor. Therefore, the command can only be the absolute path of an executable program file (.exe). The path separator (\) within a properties file has to be written twice (\\).

Note: If a program call does not work, you can test the parameters by stopping the Integration Server as a service and starting it as console application with ./bin/hub.bat. If then the call of the program works, the remaining parameters are set correctly. Now it can only be due to the authorisation of the service or to the missing environment parameters of a service. The set environment parameters of a user can be listed by calling SET without parameters. A list of the parameters and their values will be given. Depending on the program, 0 to n parameters must then be specified in addition to the program call.

Note: The return code "0" is interpreted as success, everything else as failure.

Parameters


Parameter

Description

command

The absolute file name of the executable.

param<x>

Call parameter. Index starts at 1.

waitForEnd

(true, or false) Indicates whether to wait for the program to terminate, or not. The default value is true.

waitForEndMaxTime

(optional) Waiting time in seconds until termination of the program. Default: 60 seconds.

debugonly

(true, or false) It true, the call is only simulated.

Example


sample_system_call_response.properties
command=C:\\WINDOWS\\system32\\cmd.exe
param1=/C
param2=C:\\test\\testbatch.cmd
param3=@VAR_ARG@
#waitForEnd=
#waitForEndMaxTime=
#debugonly=


The command is the pathname of the command processor cmd.exe. The first parameter /C tells it to end after running the script. param2 is the path of the script file and param3 is the first script parameter, which is provided as \%1 within the script. Variable resolution is supported if variable VAR_ARG is defined in the profile and has a value assigned by a function. The text in VAR_ARG is expected to comply with the rules of representing properties within a file, i.e. the backslash must be written twice, etc.