Mendix is great at making logic re-usable. You can,for example, take logic residing in the same Microflow and expose it via Webservice, Screen, Scheduler or Rest call. It gives you great options, kind of like how Batman gets to choose between a car and bike when he needs to go some place fast. One of the best things about the Mendix mobile movement is that that logic within microflows can also be exposed via mobile channels.
Figuring out what type of screen has to be called in a microflow might leave you feeling like you don’t know where to turn… kind of like Lucis Fox having to decide between too many options.
That’s what makes $currentDeviceType so epic. Basically this built in enumeration variable tells the microflow what type of screen invoked the microflow in the first place.
That means you can start writing microflows that show a mobile screen if a mobile device called it or show a web screen if it was called via a web screen.
Under the Hood
Mendix sets the $currentDeviceType based on what type of device is being displayed. It effectively sources that information from the URL the screen was called with in the first place.
Creating Microflows that execute the exact same business logic regardless of the front or back end calling it is fundamental element of business rule creation.