Send message to logged on users

Hi there, I wonder, is there method available in Mendix where you can push the result of microflow to all the logged on users? What I would like to do is send all the logged on users a message which says the system is going down for maintance or something. I don't want to add a microflow or something to all the screens. Kind regards.
2 answers

As far as I know there is no standard way of doing this in Mendix. What you could try, is download the Microflow Timer Widget. This widget executes a microflow every x seconds. If you create an object in your model (e.g. MaintenanceSettings) and you allow only ONE of those object in your DB, add a boolian (ShowMessage) and a string attribute (Message), you could give the Admin of your app the capability of turning this on or off and edit the desired message. The Microflow timer will retrieve this object and show the message to your user(s) if 'true'.

However, having a Microflow timer do a retrieve on your database every x minutes is not something that I would apploud. Second downside is that every form requires that Microflow Timer widget as it only works in the form where its present. You could be creative using the microflow for you navigation buttons or somewhere else. But you need the microflow triggered in order to show the message.

Hope this helps you.


If you want to learn more about reverse AJAX, you can check out this.

You could write a custom piece of Javascript and add it to your index page. But, as the article explains, polling in js has many disadvantages including loss of bandwidth and unreliable message timing.

Unfortunately, there is nothing in Mendix by default that can do this for you.