Annotation invoke how adding schema to catalog

Posted by kevin hermans on 16-Oct-2017 09:30

Dear,

BE exposed as data objects.
we are using invokes that can have datasets in there input or output parameters.

In the heading of your BE you can find:
@progress.service.resource FILE(name="", URI="", schemaName="", schemaFile="").
This works and add the dataset to your catalog.

But how I can do this for my custom methods (invokes)?
Or is this only possible by adding this to the schema defined in you main annotation.

Kind regards
Kevin Hermans

Posted by egarcia on 17-Oct-2017 08:52

Hello Kevin,

The schemaName property is used to represent the schema of the resource/Business Entity.

The schema for dataset parameters used in invoke methods is handled different.

If the dataset is the same as the one for the resource, you would use the schema property.

For other datasets, the general idea is that these schemes would be generated into the catalog as a separate property called dataDefinitions.

There is also an annotation that you can use to indicate that you want to generate the schema into the catalog.

Example:

   @progress.service.dataDefinition(name="eOrder").    

   DEFINE TEMP-TABLE ttTest

       FIELD ttCode AS INTEGER

       FIELD ttDesc AS CHARACTER.

Note: In a future version this generation will be done automatically without using the annotation.

Please notice that to call invoke operations, you just need to pass the appropriate parameters. You do not need the info in the catalog.

Are you trying to consume the schema from the catalog?

I hope this helps,

Edsel

All Replies

Posted by Sanjeva Manchala on 16-Oct-2017 10:02

Hi Kevin,
 
You can add annotations to custom methods using “Define Service Interface” wizard from Progress Developer Studio for OpenEdge (a.k.a. PDS OE). Below are the steps to add annotations to custom methods:
  1. Right click on Business Entity file from editor and then select “Source > Define Service Interface…”
  2. Select all the methods for which you want to add annotations from “ABL routines” section and click Next
  3. Select “Enable Main Annotation” check box only if there are no Main Annotations present in Business Entity file
  4. Go to “Invoke Annotations” tab and then select “Operation” as “Invoke” for all the methods and click Finish
 
This will generate the Invoke annotations for selected methods in your Business Entity class. After this, Edit the Mobile Service to get the updated info in Catalog file.
 
Hope this helps,
Sanjeev
 

Posted by egarcia on 17-Oct-2017 08:52

Hello Kevin,

The schemaName property is used to represent the schema of the resource/Business Entity.

The schema for dataset parameters used in invoke methods is handled different.

If the dataset is the same as the one for the resource, you would use the schema property.

For other datasets, the general idea is that these schemes would be generated into the catalog as a separate property called dataDefinitions.

There is also an annotation that you can use to indicate that you want to generate the schema into the catalog.

Example:

   @progress.service.dataDefinition(name="eOrder").    

   DEFINE TEMP-TABLE ttTest

       FIELD ttCode AS INTEGER

       FIELD ttDesc AS CHARACTER.

Note: In a future version this generation will be done automatically without using the annotation.

Please notice that to call invoke operations, you just need to pass the appropriate parameters. You do not need the info in the catalog.

Are you trying to consume the schema from the catalog?

I hope this helps,

Edsel

Posted by kevin hermans on 17-Oct-2017 09:46

Thank you Edsel this does the job!

Posted by kevin hermans on 23-Oct-2017 04:08

Oh sorry didn't respond on your question.

We know we don't need the data in the catalog.

But we need it to parse the catalog for our .net team that we can generate a client and use intellisense etc.. in visual studio.

This thread is closed