You can automatically add annotations in Progress Developer Studio for OpenEdge, or you can add them manually. For more information about adding annotations in Progress Developer Studio for OpenEdge, see Annotate ABL in Progress Developer Studio for OpenEdge. The following code illustrates annotations:

  • External procedure

    The following code illustrates the annotation of an external procedure, foo.p. The only required name-value pairs are type and executionMode, as shown:

/* foo.p */
@openapi.openedge.export FILE (type="ESB",executionMode="external").
DEFINE INPUT PARAM bar AS INT.
DEFINE OUTPUT PARAM ney AS CHAR.
...

Processing this annotation creates the file foo.esboe that describes a non-persistent operation named foo. foo takes an input integer named bar and returns a character string named ney.

  • Renamed .esboe file for an external procedure

    The following code illustrates the annotation of an external procedure, foo.p, that renames the generated .esboe file:

/* foo.p */
@openapi.openedge.export FILE (type="ESB", ,executionMode="external",
         esboeFileName="Renamed_foo").
DEFINE INPUT PARAM bar AS INT.
DEFINE OUTPUT PARAM ney AS CHAR.
...

This annotation creates the file Renamed_foo.esboe that describes a non-persistent operation on the PAS for OpenEdge.

  • Internal procedure

    The following code illustrates the annotation of an internal procedure, barr, inside the file foo.p:

/* foo.p */
@openapi.openedge.export FILE (type="ESB", executionMode="persistent").
DEFINE INPUT PARAM bar AS INT.
DEFINE OUTPUT PARAM ney AS CHAR.
...@openapi.openedge.export(type="ESB")
PROCEDURE barr.
DEFINE INPUT PARAM abc AS INT.
DEFINE OUTPUT PARAM xyz AS CHAR.
...

The external procedure foo must be annotated as persistent before the internal procedure barr can be annotated. Three files are created based on these annotations:

  • foo.esboe—Runs the external procedure persistently
  • foo_barr.esboe—Invokes the internal procedure
  • foo_release.esboe—Deletes the persistent procedure, unbinding PAS for OpenEdge from the process