Define an ABL REST service annotations
Print
- Last Updated: October 22, 2026
- 3 minute read
- OpenEdge
- Version 13.1
- Documentation
- Right-click on the ABL class or procedure file in the Project Explorer view, Source, or the Procedure Editor tab, and select Progress OpenEdge > Define Service Interface on the context menu. The Define Service Interface wizard appears.
- Select REST from the Definition Mode drop-down.
- In the Project Explorer view, the ABL class or procedure selected in Step 1 is automatically selected in the list of procedures and classes in the workspace, and the corresponding resources, internal functions, procedures, and methods are listed in the ABL routines area.
- In the Backup area, select the Backup selected resources check box to back up the procedure files before defining the service interface.
-
In the Location area, click
Browse and specify the backup location, and then
click Next. The Edit Annotation page
appears. It displays the following parameters in the REST main annotation and
REST detail annotation sections:
File— This attribute is mandatory. It specifies that the annotation applies to the main annotation at the ABL class or procedure level.Type— This attribute is mandatory. The value of this attribute is a comma-separated list of types. If you are annotating an external procedure for use with a PAS for OpenEdge REST Adapter, the value of this attribute must include REST.executionMode— This attribute is mandatory. It specifies how the ABL class or procedure, or an external procedure runs. If you specify the value asEXTERNAL, the procedure runs externally, the valueSINGLE-RUNallows you to call internal procedures and user defined functions in a procedure file, and the valueSINGLETONallows you to call methods in a class file or internal procedures in a procedure file. Ensure that the top-level procedure contains no parameters and the state is discarded between calls to internal procedures and functions. Persistent procedures are not supported since REST services are stateless in nature.useReturnValue— This attribute is optional. It specifies whether a return string is used for procedures. The default value is false.writeDataSetBeforeImage— This attribute is optional and the only valid value for REST is false. It specifies whether before-image data is written out when ProDataSet parameters are serialized as XML. Before-image is not supported for JSON.
- In the REST main annotation area, click Edit to edit the REST annotation for the ABL file. The New REST Annotation dialog appears.
-
In the New REST Annotation dialog, you can specify the
following:
- Enter the type of annotation to be added in the Type field.
-
Select EXECUTION MODE from the drop-down.
Note: An ABL procedure supports all the execution modes for REST. An ABL class supports only
SINGLETONexecution mode for REST. -
Select USE RETURN VALUE check box, if the ABL procedure file
returns a value. A
retValparameter is added to the procedure file to store the return value. - Select WRITE DATASET BEFORE IMAGE check box, if you want before-image data written to the OpenEdge file when ProDataSet parameters are serialized as XML.
- Click OK.
-
In the REST detail annotation area,
click Edit to edit the REST annotation for the ABL
routine in the main procedure file. The New REST
Annotation dialog appears, where you can perform the following
steps:
-
Select USE RETURN
VALUE check box, if the selected internal procedure
returns a value. A
retValparameter is added to the procedure file to store the return value. - Select WRITE DATASET BEFORE IMAGE check box, if you want before-image data written to the OpenEdge file when ProDataSet parameters are serialized as XML.
Note: You can edit REST detail annotation only if an ABL routine is selected in step 3. -
Select USE RETURN
VALUE check box, if the selected internal procedure
returns a value. A
- Click Finish.