This example shows how to design a workflow step that lets the user choose whether or not to skip that step. Use the CALLBACK_SKIP_STEP property of ENVIWorkflowStep to do this. Make sure the next step (after the skipped step) gets the data it needs.
            Copy and paste this code into the IDL Editor. Save the file as allow_skip_step.pro. Then compile and run the program.
            
            
             
            PRO allow_skip_step_callback_skip_step, workflow, _REF_EXTRA=refExtra
            COMPILE_OPT IDL2
             
            
            
            workflow.current_step.task.output_raster = workflow.current_step.task.input_raster
             
            END
             
            
            PRO allow_skip_step
            COMPILE_OPT IDL2
             
            
            e = ENVI()
             
            
            workflow = ENVIWorkflow()
            workflow.TITLE = 'Example of Optional Step'
             
            
            step1 = ENVIWorkflowStep()
            step1.TASK = ENVITask('IsodataClassification')
            step1.TITLE = 'Classify'
             
            
            
            step2 = ENVIWorkflowStep()
            step2.TASK = ENVITask('ClassificationSmoothing')
            step2.TITLE = 'Smooth'
            step2.CALLBACK_SKIP_STEP = 'allow_skip_step_callback_skip_step'
             
            
            step3 = ENVIWorkflowStep()
            step3.TASK = ENVITask('ClassificationToShapefile')
            step3.TITLE = 'Vectorize'
             
            
            workflow.Connect, step1, 'OUTPUT_RASTER', step2, 'INPUT_RASTER'
            workflow.Connect, step2, 'OUTPUT_RASTER', step3, 'INPUT_RASTER'
             
            
            envi.UI.CreateWorkflowDialog, workflow
            END
            Result:
             
                 
            
             See Also
            Customize Workflows