Use the following template as a starting point when building tasks. This template contains all possible parameter types; your custom task may not need all of them.

Follow these steps:

  1. Copy and paste the template below into a new text file.
  2. Update the name value with your own custom task name.
  3. Update the routine value with the name of the corresponding IDL procedure.
  4. Delete any parameters from this template that you do not need. For example, if your custom task does not have any parameters that are dynamic arrays, delete the INPUT_DYNAMIC_ARRAY section.
  5. Save the template with a .task file extension. See Deploy Custom Tasks for preferred locations to save task templates.
  6. Optional: open the task file in the IDL Workbench and validate the JSON code.
{
   "name": "ENVITaskTemplate",
   "base_class": "ENVITaskFromProcedure",
   "routine": "templateTask",
   "display_name": "ENVI Task Template",
   "description": "Use this template as a reference when building tasks for a new procedure.",
   "revision": "1.0.0",
   "schema": "envitask_3.2",
   "parameters":[
     {
       "name": "INPUT_RASTER",
       "display_name": "Input Raster",
       "type": "ENVIRASTER",
       "direction": "input",
       "required": true,
       "description": "Specify an input raster to process."
     },
     {
       "name": "OUTPUT_RASTER",
       "display_name": "Output Raster",
       "type": "ENVIRASTER",
       "direction": "output",
       "required": true,
       "description": "This is a reference to the output raster of filetype ENVI.",
       "uri_param": "OUTPUT_URI"
     },
     {
       "name": "INPUT_CHOICE_LIST",
       "display_name": "Input choice list w/default",
       "type": "STRING",
       "direction": "input",
       "required": false,
       "choice_list": ["Method One","Method Two","Method Three"],
       "default": "Method Three",
       "description": "Specify the method to use for processing. Default is Method Three."
     },
     {
       "name": "INPUT_STATIC_ARRAY",
       "display_name": "Input array of [3,256]",
       "type": "BYTE[3,256]",
       "direction": "input",
       "required": false,
       "description": "Specify a byte array of [3,256]."
     },
     {
       "name": "INPUT_DYNAMIC_ARRAY",
       "display_name": "Input array of [3,n]",
       "type": "BYTE[3,*]",
       "direction": "input",
       "required": false,
       "description": "Specify a byte array of [3,n]."
     },
     {
       "name": "INPUT_BOOLEAN",
       "display_name": "Input True or False",
       "type": "BOOL",
       "direction": "input",
       "required": true,
       "default": true,
       "description": "Specify true or false for the parameter."
     },
     {
       "name": "INPUT_RANGE",
       "display_name": "Input range w/max and min",
       "type": "UINT",
       "direction": "input",
       "required": false,
       "min": 0,
       "max": 100,
       "description": "Specify an integer between 0 and 100."
     },
     {
       "name": "INPUT_MINIMUM",
       "display_name": "Input w/minimum",
       "type": "FLOAT",
       "direction": "input",
       "required": false,
       "min": 1.0,
       "description": "Specify floating number greater than or equal to 1.0."
     },
     {
       "name": "OUTPUT_URI",
       "display_name": "Output filename",
       "type": "ENVIURI",
       "direction": "output",
       "required": true,
       "description": "Specify the output filename.",
       "is_temporary": true
     }
   ]
}