Using regions to define blocks of code

A region defines a block of code with a user-defined name.

About this task

When a region is included in your process script, you can click the accompanying Expand/Collapse control to expand or collapse the region. This is useful when working with long or complex processes.

A region in the process editor.

Procedure

  1. On the Script tab of a process, enter #Region, followed by a space and a name for the region.
  2. On subsequent lines, enter the code that you want to include in the region.
  3. On a new line after the last line of code, enter #EndRegion.

    For example:

    #Region  Dimension Creation
    
    vDimensionName = 'testDimension';
    IF ( DimensionExists ( vDimensionName ) = 0 ) ;
    DimensionCreate ( vDimensionName ) ;
    ENDIF ;
    
    #EndRegion