You can use the Define Service Interface wizard to add the ABL Data Object interface annotations to your existing ABL class and procedure files. Defining the service interface involves adding ABL Data Object interface annotations to the ABL class (.cls) and procedure (.p) files. You can then expose the ABL Data Object annotated ABL class and external procedure files as ABL Data Object resources.

Note: To create a ABL Data Object resource from an ABL external procedure, the ABL external procedure must be coded to be run as a singleton procedure. For more information, see the SINGLETON option of the RUN statement in the ABL Reference.

To add ABL Data Object interface annotations to an ABL class or procedure file:

  1. From the Project Explorer view, select a ABL WebApp project.
  2. Right-click the ABL WebApp project, and then select Progress OpenEdge > Define Service Interface on the context menu. The Define Service Interface wizard appears.
  3. From the Definition Mode drop-down, select Data Object. By default, it is set to Data Object.
  4. From the Workspace resources list, select the ABL class and procedure files to which you want to add ABL Data Object interface annotations. This defines the ABL Data Object interface annotations at the procedure or class file level.
    Note: If the selected ABL application contains ABL routines (internal procedures, methods, and user-defined functions), they appear on the ABL routines list.
  5. From the ABL routines list, select the ABL routines to which you want to add the ABL Data Object annotations. This defines the ABL Data Object interface annotations at the routine level.
  6. Click Next. The Edit Annotation page appears.
    The Edit Annotation page displays the selected resources in the Select a file list and allows you to select a schema file for a resource and associate a ABL Data Object operation: CRUD (Create, Read, Update, and Delete), Submit, and Invoke.
  7. From the Select a file list, select an ABL resource for which you want to define a schema file and associate ABL Data Object operations: CRUD, Submit, or Invoke with ABL routines.
  8. On the Main Annotations tab, specify the resource URI and schema for the selected resource. For more information, see the Edit Annotation page tab.
    Note: Select the Enable Main Annotation check box to enable editing.
  9. On the CRUD annotations tab, associate ABL routines with CRUD operations (Create, Read, Update, and Delete) or the Submit operation. You can use only one-to-one association. For more information, see the Edit Annotation page tab.
    For example, if there is an ABL routine defined as P1 and you want to associate it with the create operation, then select P1 in the Routine name drop-down for the create operation. You cannot associate the ABL routine P1 with any other CRUD operation once it is associated with one operation.

    To associate an ABL routine with the Submit operation, you must select the Before-Image option. The Submit operation is only applicable to the datasets (not temp-tables) that you select on the Main Annotations tab. For more information, see the Edit Annotation page tab.

    Note: Before you associate any operation with an ABL routine, you must select a schema file for the current ABL application on the Main annotations tab.
  10. On the Invoke Annotations tab, associate one or more ABL routines with an invoke operation. You can map as many ABL routines in an ABL file as you have available to an invoke operation. For more information, see the Edit Annotation page tab.
    Note: You cannot associate an ABL routine that is already associated with one of the CRUD operations, with the invoke operation.
  11. On the Field Annotations tab, specify the fields and appropriate field-level annotations for the selected resource. For more information, see the Edit Annotation page tab.
  12. Click Finish to save your settings and close the Define Service Interface wizard.
The selected ABL class and procedure files are annotated with ABL Data Object interface annotations, and this completes the generation of a ABL Data Object resource for each file.
Note: When you add ABL Data Object interface annotations for ABL resources from a non-ABL WebApp project such as ABL AppServer facets, like ABL REST Service, the ABL Data Object Service facet is enabled for the project and an ABL Data Object Service gets created. The project behaves as an ABL WebApp project using which you can develop ABL Data Object applications. When you add annotations to any class or procedure file, if the ABL AppServer facet is not available for the project then the project is converted to an ABL Web App project with additional ABL REST Service and ABL Data Object Service facets and a REST based ABL Data Object service is created. The Project Facets page (select Properties > Project Facets on the project context menu) displays the facets associated with your current project.