Abstracting the JFPFillMethod in BusinessEntity Classes for PASOE Endpoints Consumed by JSDO - Forum - OpenEdge Development - Progress Community

Abstracting the JFPFillMethod in BusinessEntity Classes for PASOE Endpoints Consumed by JSDO

 Forum

Abstracting the JFPFillMethod in BusinessEntity Classes for PASOE Endpoints Consumed by JSDO

This question is not answered

We have been using the Progress JFPFillMethod as described in this article: https://documentation.progress.com/output/OpenEdge117/openedge117/#page/dvwsv%2Fsample-read-operation-updated-to-handle-jfp-inpu.html%23

This enables us to produce a RESTful API that can be consumed by a JSDO client and supports filtering, top, skip, etc. So far, the JFPFillMethod has done a great job of implementing this functionality. However, there is one issue in that it has to be added to every single class (BusinessEntity) that we add to a service. Thus, we are in the process of creating a BusinessEntity class that will be inherited by all classes we create. We would like to put the JFPFillMethod into this class. Has anyone done this? Is there another class that already implements the JFPFillMethod? The main trouble we've run into so far is how to pass the four items from the subclass to this new class:

Here is the start I have so far: (bTable -> buffer for the real table, bTempTable -> buffer for the temp table as defined in the subclass .i file, dsTable -> DataSet for the temp table as defined in the subclass .i file, srcTable -> DataSource for the real table)

METHOD PROTECTED VOID JFPFillMethod(
      INPUT filter AS CHARACTER,
      BUFFER bTable,
      BUFFER bTempTable,
      INPUT-OUTPUT dsTable AS DATASET,
      INPUT-OUTPUT srcTable AS DATA-SOURCE
      ):

However, I don't think the 2 buffers can be declared this way as the BUFFER statement requires a FOR <table> which we would not be able to do from this parent class. How would we pass the 2 buffers, dataset, and data source as parameters to a super class method?

Backend Environment:
PSDOE 4.5.2
OpenEdge 11.7.3
PASOE Dev/Prod Servers - REST transport (we plan to migrate to WEB transport in the future)

Frontend Environment:
Angular 7
Telerik Kendo UI for Angular
JSDO 6.0.1

All Replies
  • Quick reply.

    There are some enhancements around Business Entities based on the CCS, however, I do not know when they would be available.

    I think that you could change JFPFillMethod() in a way that it only needs the filter and the output temp-table.

    You can take a look at the sample "WebSpeed Generic Service for the JSDO using OpenEdge 11.6":

    - community.progress.com/.../2677

    This example shows a dynamic/generic class to perform read operations.

    The approach in this sample is such that you can have a virtual Business Entity with READ support and if you provide a static Business Entity to override the generic class.

    I hope this helps.