Can you override the Rollbase READ operation for OpenEdge se

Posted by mihai_neagoe on 25-Feb-2014 05:04

Hi,

I am trying to override the read functionality for an OpenEdge service object so I can pass to BL a string that could help on filtering the records. Is there a posibility to do it in a script component?

Another idea is to invoke a service that would create a record in the database with filtering options and with a ClientContextId. The read method would get the record from the database for the current client and would set as output only the filtered records. Is this a feasible option? And what would be the steps for implementing this? (setting the client principal on the first request and getting the client on the read operation?)

Are there any other options?

Thank you.

Posted by egarcia on 25-Feb-2014 05:54

Hello,

We are planning to add filter support in a future release. We are working on a model that would allow any of the Rollbase where clause to be mapped to an OpenEdge Service / Business Entity.

I do not think that we have a general workaround for this today.

In the other hand, you idea seems a possible way around this (depending on the use case).

A limitation is to identify session and associate it with the user.

A simplified version would be to use the userid instead of the ClientContextId. (Assuming that a user only has one session.)

Using the ClientContextId would be a better approach since it would prevent the filter for a user being set by another one.

To create the record in the database, you can invoke a method in the Business Entity.

You need to consider here that requests are asynchronous.

Depending on your need, you can have this code being called from the client (JavaScript in a form) or from the server (Object Script).

Here are the references in the wiki to the white papers showing how to access the AppServer from Rollbase:

community.progress.com/.../2156.accessing-the-openedge-appserver-from-rollbase.aspx

I hope this helps.

All Replies

Posted by egarcia on 25-Feb-2014 05:54

Hello,

We are planning to add filter support in a future release. We are working on a model that would allow any of the Rollbase where clause to be mapped to an OpenEdge Service / Business Entity.

I do not think that we have a general workaround for this today.

In the other hand, you idea seems a possible way around this (depending on the use case).

A limitation is to identify session and associate it with the user.

A simplified version would be to use the userid instead of the ClientContextId. (Assuming that a user only has one session.)

Using the ClientContextId would be a better approach since it would prevent the filter for a user being set by another one.

To create the record in the database, you can invoke a method in the Business Entity.

You need to consider here that requests are asynchronous.

Depending on your need, you can have this code being called from the client (JavaScript in a form) or from the server (Object Script).

Here are the references in the wiki to the white papers showing how to access the AppServer from Rollbase:

community.progress.com/.../2156.accessing-the-openedge-appserver-from-rollbase.aspx

I hope this helps.

Posted by mihai_neagoe on 25-Feb-2014 07:51

Hi,

Thank you for the answer. The problem for the workaround is that I don't see how we can link the user who made the initial invoke for setting the filter with the user who does the ReadData.

We are using a state-free Appserver so I think there will be two separate identifiers for the two requests.

This thread is closed