The GetExecutedTask method returns a copy of an ENVITask that was executed on an ENVIServer, along with its input and output parameters. Information about the executed task will be available after you start a new ENVI session if you enter a valid job ID. If you are trying to get an executed task from a remote server, and one or more of the outputs were created in a shared workspace, be sure to define the location of that workspace when you define your ENVIServer. This ensures that ENVI can actually locate the files. See the ENVI Servers topic for instructions on how to configure the workspace of an ENVI Server that is going to be used by others.
Example
e = ENVI(/HEADLESS)
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Task = ENVITask('ISODATAClassification')
Task.INPUT_RASTER = Raster
Server = ENVIServer('localhost')
Job = Server.SubmitTask(Task)
Wait until the job completes successfully. Then run the following commands:
Executed_Task = Server.GetExecutedTask(Job)
Print, Executed_Task
View = ENVI.GetView()
!NULL = View.CreateLayer(ExecitedTask.OUTPUT_RASTER)
Syntax
Result = ENVIServer.GetExecutedTask(JobID [, ERROR=value])
Return Value
This method returns a copy of an ENVITask that was executed on an ENVIServer, along with its input and output parameters.
Arguments
JobID
Specify the job ID that was executed.
Keywords
ERROR
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
Version History
API Version
4.3
See Also
ENVIServer