26
Views
8
Comments
Solved
Redirect User to Maintanance Screen immediately
Question

Hi guy,

I am implementing the maintenance phase for the project that is already running. 

I created IsMaintainanceMode (Setting) flag. I want that if that variable is set to true, the user should be immediately go to the Maintainance screen (The system is undergoing maintenance). 

I don't want to have to check it before every action because that would have a big impact on the code that's already been implemented.  

My current solution is 2 point below but it is not real-time. Is there any way to implement real-time in this case? 

- I will check when the screen is first initialized.

- 1 JS code to check it every 60 seconds. 

Thank you.

2025-12-04 09-01-03
Kiet Phan
Champion
Solution

in OS 11, there is a forge name SSE push event for easily implement your requirement.

In ODC, I prefer google firebase for realtime push message, it's free.

But for business wise, we shouldn't suddendly turn on maintenance mode for any purpose, that cause user transactions failure and inconvenience. maintenance should have be announced days before with exactly time period.


2024-10-05 13-30-20
Huy Hoang The

Thank you so much! Your idea is perfect.

2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution

Hi @Huy Hoang The ,

If you want true real-time : use an external push service (Pusher/Azure SignalR/your Socket server) and subscribe from a small JS block in the Main Layout.

Regards,

Manish Jawla

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Huy Hoang The ,

You can handle this centrally in OutSystems ODC by creating a Site Property (e.g. IsMaintenanceMode) in your Theme module. The value can be managed per environment directly from Service Center, without redeploying.

Then, check this Site Property in the Main Layout. If it’s True, redirect users to a Maintenance screen. Since all screens use the main layout, you avoid adding checks to every screen, and maintenance mode is applied globally with minimal code changes.

Hope this helps.

regards,

Manish Jawla

2024-10-05 13-30-20
Huy Hoang The

currently i am handle this same u, on layout to apply all screens, but

Site Property only get by DataAction and it only get when i call data action. it's not real-time when user set IsMaintenanceMode = true.


2019-11-11 17-10-24
Manish Jawla
 
MVP
Solution

Hi @Huy Hoang The ,

If you want true real-time : use an external push service (Pusher/Azure SignalR/your Socket server) and subscribe from a small JS block in the Main Layout.

Regards,

Manish Jawla

2024-10-05 13-30-20
Huy Hoang The

I think so, but I think it will incur additional costs and I need to confirm with the client.

Thank you so much!

2024-12-02 13-16-47
Vipin Yadav

Hi Huy Hoang The,

This cannot be implemented in a single place purely at the application level. If you choose this approach, you must check the Site Property in the OnInitialize of every screen and redirect to the Maintenance page when it is True.

Thanks,
Vipin Yadav

2023-10-16 05-50-48
Shingo Lam

He needs that the guys at the middle are also forced to go the maintenance page when the flag is turned on. It can only be achieved by socket / push notification / etc.

2025-12-04 09-01-03
Kiet Phan
Champion
Solution

in OS 11, there is a forge name SSE push event for easily implement your requirement.

In ODC, I prefer google firebase for realtime push message, it's free.

But for business wise, we shouldn't suddendly turn on maintenance mode for any purpose, that cause user transactions failure and inconvenience. maintenance should have be announced days before with exactly time period.


2024-10-05 13-30-20
Huy Hoang The

Thank you so much! Your idea is perfect.

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