Disable functionality & display message during maintenance

0
I want to disable user functionality on my app while I’m carrying out data migrations, and display a message to say this is what is happening. So far my idea is to create a constant “AccessEnabled” that can be set per environment, which I have done, but now I am having trouble working out the next bit. Can I disable a whole module based on a constant, say, at start up? How can I just display a message or remove a button based on a constant? It tells me I can only use visibility expressions within a data widget, but these things aren’t within a data widget.   Or is there a better way to do this? Mendix version 8.5.0 (not available in the dropdown to pick so I picked the closest 8.4.2).
asked
2 answers
0

First you need to find all microflows and navigation that leads to this module. I would not use a constant but a setting boolean you can influance as admin so no restart is necesarry once you are done.

Now for microflows you can check your setting boolean and show a message or just stop if the boolean is active. For navigation you would need to replace all pages by a microflow that checks the boolean and either opens the page or informs the user that a migration is happening.

Regards,

Ronald

 

answered
0

Thanks for your reply. A few follow up questions:

“setting boolean” – do you mean create it in an entity in a Domain Model?

What about the default home page in Navigation? That can never be a microflow.

 

answered