Try OpenEdge Now
skip to main content
Web Services
Creating OpenEdge REST Web Services : REST Applications : REST annotations in ABL code : Main REST annotations
 
Main REST annotations
The main REST annotation must be located at the beginning of a file, preceding any ABL statements.

Syntax

@openapi.openedge.export FILE (
TYPE="REST"
executionMode={ "EXTERNAL" | "SINGLE-RUN" | "SINGLETON" },
[ , useReturnValue={ "TRUE" | "FALSE" }]
[ , writeDataSetBeforeImage={ "TRUE" | "FALSE"}] ).
FILE
Specifies that the annotation applies to the entire file.
TYPE
The value of this attribute is a comma separated list of types. If you are annotating an ABL source file for use in a REST service, the value of this attribute must include "REST".
executionMode
A value of "EXTERNAL" specifies that the ABL source file is an external source file. That is, it contains a single procedure or user-defined function. There is no need to add any other annotations when executionMode is set to "EXTERNAL"
A value of "SINGLE-RUN" or "SINGLETON" allows you to call internal procedures and user-defined functions in an ABL source file. If you specify one of these values, the top level procedure cannot contain any parameters. Also note that no state information can be preserved by internal procedures or user-defined functions.
Note: In single-run mode, the external procedure is deleted when the internal procedure or user-defined function completes execution. In singleton mode, the external procedure remains instantiated after its internal procedure or user-defined function completes execution.
useReturnValue
If "TRUE", specifies that a return string is used for procedures. If this option is not specified or if the value is "FALSE" , there will be no return string
writeDataSetBeforeImage
Not supported in this release. Attribute should be removed or set to "FALSE".