Try OpenEdge Now
skip to main content
Messaging and ESB
Sample Native Invocation ESB process : Annotate source with OpenEdge Architect
 

Annotate source with OpenEdge Architect

Annotate your source in OpenEdge Architect to provide the information required to create your native invocation file.
Note: There are other methods of creating native invocation files, such as ProxyGen, but creating them from annotated source is the preferred method. See ProxyGen section for more details.
To annotate your source:
1. Start OpenEdge Architect and open your source file.
Note: Your source file must be in a project. For information on projects, see the OpenEdge Architect online help.
2. Right-click in the source window and select Source > Add Annotation, as shown:
3. The Add Annotation dialog box appears:
4. Select ESB Annotation - Main annotation from the drop-down in the Select annotation or enter annotation in text editor section, and then and select your file.
5. Click Finish to add the annotation. The annotated source follows:
@openapi.openedge.export FILE(type="ESB", esboeFilename="%FILENAME%",
useReturnValue="false", writeDataSetBeforeImage="false", executionMode="external").
DEF INPUT PARAM customerNumber AS INTEGER.
DEF OUTPUT PARAM customerName AS CHAR.
IF CONNECTED("sports2000") THEN DO:
FIND FIRST customer WHERE custNum = customerNumber NO-LOCK NO-ERROR.
IF AVAILABLE customer THEN
customerName = Name.
ELSE
customerName = "No record".
MESSAGE "CustomerName = " customerName SKIP.
END.