Launch External Application

Operation Name

Launch External Application

Function Overview

Call an external application.

Properties

For details on use of variables, refer to “Variables”.
Basic settings
Item name Required/Optional Use of variables Description Remarks
Name Required Not available Enter the name to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Launch command Required Available Enter the command (program) to launch.

You can click [Browse] button to launch file chooser and find the file.

Example: To launch Internet Explorer
C:\Program Files\Internet Explorer\iexplore.exe
  • Launch command will be executed in the machine where DataSpiderServer is installed.
  • Specify that as absolute path of the server OS local file system.
  • You can specify command which the user who is running DataSpiderServer can execute.
Launch parameters Optional - Specify parameters to pass to the command.

Operate with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the selected column upwards by one row.
  • [Down]:
    Move the selected column downwards by one row.
  • [Delete]:
    Delete the column.
 
Launch parameters/Parameter Optional Available Specify a parameter to pass to the command.

In command description, specify file paths in “absolute path ("C:\Progra~1\Data~") ” or “relative path ("..\home\root\~")” from DataSpiderServer /bin.

Example: To delete C:\test.csv
[Launch command]: cmd.exe
[Parameter]: /C
[Parameter]: del
[Parameter]: C:\test.csv
 
Execution settings
Item name Required/Optional Use of variables Description Remarks
Working directory Optional Available Enter the command working directory.

You can click [Browse] button to launch the directory chooser and find the directory.

Relative paths in command will be the relative paths from the working directory.
  • Specify that as absolute path of the server OS local file system.
  • If omitted, “$DATASPIDER_HOME/server” is set.
Wait until external application ends Optional Not available Select whether or not to wait until the specified command ends.
  • [Checked]: (default)
    Wait until the specified command ends.
  • [Not checked]:
    Do not wait until the specified command ends.
 
Error when return value is not 0 Optional Not available Select whether or not to make it error when the return value of the specified command is not 0.
  • [Checked]: (default)
    When the return value of the specified command is not 0, it will be an error.
  • [Not checked]:
    Even when the return value of the specified command is not 0, it will not be an error.
  • Enabled when [Wait until external application ends] is checked.
Get standard output / standard error output Optional Not available Select whether or not to store standard output / standard error output which are output by the specified command in component variables so that you can get them.
  • [Checked]:
    Standard output / standard error output which are output by the specified command will be stored in component variables.
  • [Not checked]: (default)
    Standard output / standard error output which are output by the specified command is not stored in component variables.
  • Enabled when [Wait until external application ends] is checked.
Timeout Optional Available Enter the time to wait until the specified command is completed, in millisecond.
  • Enabled when [Wait until external application ends] is checked.
  • If omitted, 0 is set.
  • If 0 is set, timeout does not occur.
  • The launched process will be aborted when the specified command is not completed in the specified milliseconds.
Comment
Item name Required/Optional Use of variables Description Remarks
Comment Optional Not available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
exitValue The return value of command is stored.
  • Default value is null.
  • When [Wait until external application ends] is not checked, -1 is always stored.
  • When failed to launch command, -1 is stored.
stdout The standard output value of command is stored.
  • Default value is null.
  • When [Wait until external application ends] or [Get standard output / standard error output] is not checked, empty string is always stored.
  • When failed to launch command, empty string is stored.
stderr The standard error output of command is stored.
  • Default value is null.
  • When [Wait until external application ends] or [Get standard output / standard error output] is not checked, empty string is always stored.
  • When failed to launch command, empty string is stored.
message_category When an error occurs, the corresponding message code's category is stored.
  • Default value is null.
message_code When an error occurs, the corresponding message code is stored.
  • Default value is null.
message_level When an error occurs, the corresponding message code's severity is stored.
  • Default value is null.
error_type When an error occurs, the error type is stored.
  • Default value is null.
  • The error type will be in the following format.
    Example: “java.io.FileNotFoundException”
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_message When an error occurs, the error message is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the error's trace information is stored.
  • Default value is null.
  • The contents that will be stored may vary depending on DataSpider Servista versions and client applications.

Specification Limits

Major Exceptions

Exception name Cause Solution
InvalidPropertyConfigurationException [Launch command] is not specified. Specify [Launch command].
LaunchException The return value of the command is not 0. Check the contents of the launched command.
LaunchTimeoutException Command execution was not completed within [Timeout]. Check [Timeout].
java.io.IOException Failed to launch the command. Check [Launch command].

Notes