28
Views
4
Comments
Refreshing page/screen, when another screen from another module make changes.
Application Type
Reactive
Service Studio Version
11.54.30 (Build 62899)

Hi all, I want to ask for a help. Right now, I have 2 different reactive application. 1 is for the system configuration, 1 is for the end user application. And there is a case where when an admin make some changes on the screen of their application (the changes will be save in the db), it will be reflected to the end user application's screen where they need to stop whatever they are doing and refresh the page.


It is possible to do it and can someone teach me how? Thank you so much.

I see only 2 possibilities for this.

  1. Have a timer that checks every now and then for a configuration change. This puts stress on the environment if you have a lot of screens that do this at the same time. I would not advice this.
  2. Use an Service Side Event solution where you will signal the users session of the configuration change. You can then act upon this signal. I would implement this approach.

Hope this helps,

Vincent

Hi Syakir,

You can consider these two simple options as well

1. Every time user perform an action on the screen that sends a request to add/update any information in database, you perform a check whether configurations have been updated. If the new configurations allow user to perform the requested action then let it proceed, otherwise abort the request and show appropriate error message to user.

2. Add a java script on your screen which executes after every few seconds to check if the configurations have changed in database. If java script returns with a configuration change then refresh the screen with appropriate message to the user, otherwise let user continue his work. This one however is not an optimal solution as it involves unnecessary hits to the database.

Hope it helps!

Junaid

When I mentioned Timer I meant the Javascript Interval capability. I would recommend to use this forge component for it as it an easy to use component that you can configure as you like (even at runtime):

https://www.outsystems.com/forge/component-overview/8422/timing-events


If the page is a Form, you can check if is there any changes when submit data and inform the user or reload the page or have other approach. 

Otherwise, use timer as mentioned before.

Regards,

João

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.