The IDLTaskEngine executable handles input and output using stdin and stdout. Any errors that were generated are sent to stderr. The IDLTaskEngine executable also returns an exit code that you can check.

For command-line arguments and options see IDL Task Engine.

For working examples of command line input and output, see IDLTaskEngine Examples.

Input


Specify input as a JSON object that contains a taskName key with the desired IDL Task to run and an inputParameters key with the task parameters. If the IDLTaskEngine does not require any parameters, then you can omit the inputParameters key.

Key:

taskName

Value:

The base name of an IDLTask (without the "IDL" and "Task" text) or an explicit path to a task file (.task). Use QueryTaskCatalog Task to get a list of available tasks names. See an example.

 

Key:

inputParameters

Value:

Task input parameters and their values. Each element of the JSON input is a key/value pair with a parameter name and value. Use QueryTask Task to get a list of parameters for a given task. See an example.

Example of Input

{
   "taskName": "MyFavTask",
   "inputParameters": {
      "threshold": 20
   }
}

Output


The IDLTaskEngine executable provides output via stdout in JSON format. If the task generates output, it will be in the outputParameters key. If there is no output for the given task, then outputParameters key will contain an empty JSON object.

Key:

outputParameters

Value:

Task output parameters and their values. Each element of the JSON output is a key/value pair with a parameter name and value.

Example of Output

{
  "outputParameters": {
       "sum": 4
   }
}

Errors


The IDLTaskEngine executable sends errors and warnings to stderr. For example, issuing the following command:

Bash shell:

echo '{"taskName":"doesnotexist"}' | InstallDir/bin/idltaskengine

Windows terminal:

echo {"taskName":"doesnotexist"} | idltaskengine.bat

Results in the following output via stderr:

No task matches: doesnotexist.

Exit Status


The IDLTaskEngine executable returns the following values indicating its exit status:

  • 0: Success
  • 1: General error
  • 2: IDL interpreter stopped unexpectedly
  • 128 + n: Application received fatal error signal "n"

Scripts that call the IDLTaskEngine executable should check the exit status after running the executable. Bash scripts can do this using the $? environment variable. Windows batch scripts can do this using the %ERRORLEVEL% environment variable.