Rollbase 3.0 info/warning messages

Posted by mihai_neagoe on 05-Aug-2014 06:56

Hi,

Is there a possibility in Rollbase 3.0 to send info or warning messages from ServiceInterface? Currently we are able to send error messages (possible in 2.2 as well) but sending an error message redrects the user to an error page.

Thank you.

All Replies

Posted by Orchid Corpin on 05-Aug-2014 10:38

Hi Mihai,

I need more information on this.
Can you send some steps to replicate on how you are doing this?
Thank you.

Regards,
Orchid

Posted by mihai_neagoe on 25-Aug-2014 09:16

Hi Orchid,

Sorry for the late reaction, I missed your reply.

The scenario is the following:

- create an OpenEdge service object

- in the service interface on update method add a 'RETURN ERROR "123"'.

- update a record in Rollbase

The error message is displayed in a System error frame. This stops the update process and I am checking if there is a possibility to return the error message but let the user continue updating the record.

Posted by Orchid Corpin on 26-Aug-2014 14:50

Hi Mihai,

May I know the exact error message you get when editing the record?

Regards,
Orchid

Posted by mihai_neagoe on 29-Aug-2014 03:31

This is a custom message sent from OpenEdge service interface. This is from Update method (triggered by a save record on a OpenEdge Service object in Rollbase) and the code is

RETURN ERROR NEW Progress.Lang.AppError("You have not entered the hours for person 'M'",1).

The question I have is if there is another way to send this message and display it as standard Rollbase message wihout leaving the edit page.


Mihai

Posted by Bill Wood on 29-Aug-2014 03:45

I do not believe so. Rollbase does not distinguish between errors that are "recoverable" (that is, a validation error on the dataset that the user could correct and resubmit) vs a System error that is not recoverable (eg. Db connection lost, or duplicate record exists, rest service not reachable, etc).

Historically write errors were mostly all System ones and Rollbase "cancelled" the update and bumped you out of the edit page.

I don't know a workaround (except coding the validation as a Rollbase trigger before the update). Maybe someone else has an idea ;-)=

Posted by Orchid Corpin on 29-Aug-2014 11:19

Hi Mihai,

Do you have a field that requires a value? Probably that could have cause the error based on the message that "You have not entered the hours for person...".
Another way is since you are using Rollbase you can convert this validation into Rollbase field validation or validation trigger.

Regards,
Orchid

Posted by mihai_neagoe on 04-Sep-2014 05:21

Hi Orchid,

These are business logic validations which are already defined in the Progress code. We don't have the possibility to move all the validations in Rollbase so I am checking if there is an option to use Rollbase error messages (default behaviour) but for validations made in the Progress code. Now this works - the messages are sent but the user is redirected from the edit page to the error page.

Posted by egarcia on 04-Sep-2014 10:01

Hello,

Here is a possible workaround. (I have not tried it out yet myself.)

The Business Entity could have an method defined as an INVOKE operation that you could call from the Rollbase form prior to saving the data (you can use the JSDO in JavaScript to do this). Perhaps, in this way, the form can validate the changes using the business logic validations in the Business Entity and provide the user with the information message.

I hope this helps.

Posted by Orchid Corpin on 09-Sep-2014 13:00

Hi mihai,

Is the workaround given by [mention:98b1534299774239b816c694c6295179:e9ed411860ed4f2ba0265705b8793d05] works for you? If not just let me know so I will look for another solutions for your issue.

Thanks,

Orchid

Posted by mihai_neagoe on 12-Sep-2014 04:27

Hi Orchid,

The workarround from Edsel is indeed a workable solution for one of our objects. I was checking for a generic solution for this - in the workarround we do the same validation twice. This may impact the performance.

We were thinking on adding a 'Check' button that the user will press before save and use the same validations as for standard save and return the messages in a Rollbase Error box.

A question on this would be how to collect the data from the screen that should be the same as Rollbase is going to send for save. And here maybe it is a possibility to make it generic (the name of the object matches the temp-table name, for the fields we can probably use the integration name together with the object name)

Posted by Orchid Corpin on 15-Sep-2014 18:06

Hi mihai,

If the check button will not redirect user to other page then collection of data can be done through using Rollbase browser-side API like rbf_getFieldValue(fieldName).

Regards,

Orchid

Posted by Orchid Corpin on 25-Sep-2014 17:57

Hi Mihai,

Where you able to get the values on the screen using rbf_getFieldValue()? If you have picklist you can use rbf_getPicklistCode().
See other field manipulation in the documentation Chapter 14 > Field Manipulation
http://documentation.progress.com/output/Rollbase/RB_User_Guide.pdf

Hope this may help.

Regards,
Orchid

This thread is closed