Launch External Application

Operation Name

Launch External Application

Function overview

Calls external application.

Properties

For information about using variables, refer to "variables".
Basic settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not available Input the name on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Launch command Required Available Input the command (program) to launch.

Click [Browse] button to activate the file Selectr and Select the file.

Example: To launch Internet Explorer
C:\Program Files\Internet Explorer\iexplore.exe
  • Launch command will perform on the machine on which DataSpiderServer is installed.
  • Specify the absolute path on the server OS local file system.
  • Commands that can be executed by the user who started DataSpiderServer can be specified.
Launch arguments Optional - Specify the argument to pass to the command.

Can be operated with the following buttons.
  • [Add]:
    Add a column.
  • [Up]:
    Move the order of the selected column upwards by one.
  • [Down]:
    Move the order of the selected column downwards by one.
  • [Delete]:
    Delete the column.
 
Launch arguments / Arguments Optional Available Specify the argument to pass to the command.

Specify absolute path("C:\Progra~1\Data~") or relative path from /bin of DataSpiderServer("..\home\root\~") for the file path in command description.

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

Click [Browse] button to activate the file Selectr and Select the directory.

When use a relative path in the command , working directory will be the relative path.
  • Specify the absolute path on the server OS local file system.
  • It defaults to '$DATASPIDER_HOME/server' if omitted.
Wait until the end of the external applications Optional Not available Select whether to wait until the end of the specified command.
  • [Checked]: (default)
    Wait until the end of the specified command.
  • [Not Checked]:
    Do not wait until the end of the specified command.
 
Assume error if return code is not 0 Optional Not available Select whether it is an error if the return value is not 0.
  • [Checked]: (default)
    An error occurs when the return value is not 0.
  • [Not Checked]:
    No error occurs when the return value is not 0.
  • Valid if [Wait until the end of the external applications] is checked.
Obtain stdout and stderr Optional Not available Select whether to obtain stdout and stderr output by the specified command and set them to the component variables of this operation.
  • [Checked]:
    Obtain stdout and stderr and set them to the component variables.
  • [Not Checked]: (default)
    Do not obtain stdout and stderr and do not set them to the component variables.
  • Valid if [Wait until the end of the external applications] is checked.
Timeout Optional Available Specify timeout in millisecond. This operation waits for completion of the specified command until the timeout.
  • Valid if [Wait until the end of the external applications] is checked.
  • If you omit the "0" is set.
  • If the "0" is set this operation waits for completion of the specified command forever.
  • When the specified command does not complete within the timeout, the command is interrupted.
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 Returns the return value of command.
  • The value defaults to null.
  • If [Wait until the end of the external applications] is not checked ,-1 is returned.
  • If the command fails to start, "-1" is returned.
stdout Stdout of the command is stored.
  • The value defaults to null.
  • The empty string is stored when [Wait until the end of the external applications] and [Obtain stdout and stderr] are not checked.
  • The empty string is stored if the command failed to launch.
stderr Stderr of the command is stored.
  • The value defaults to null.
  • The empty string is stored when [Wait until the end of the external applications] and [Obtain stdout and stderr] are not checked.
  • The empty string is stored if the command failed to launch.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

Main 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 The command was not completed within [Timeout]. Check [Timeout].
java.io.IOException Command failed to start. Check [Launch command].

Notes