Mendix uses visual models to define the logic of your application, we call those models Microflows. A Microflow is a visual way of expressing what traditionally would be written in code. This how-to explains how you can create a very simple ‘Hello World’ Microflow.
1. Creating a Menu Item
Microflows can be triggered in many different ways, as explained here. For this how-to you’ll be using a menu item to trigger the new Microflow.
- Open the navigation editor and add a menu item in the desktop navigation settings.
- Enter a caption like Hello World.
- Click Select… at the Target section to open the navigation target selector.
- Select a module and click the New button.
- Click Create a microflow to connect a new Microflow to this menu item.
- Name the Microflow HelloWorld.
- Save the new menu item by clicking OK.
2. Edit the New Microflow
To open the new Microflow, right click the navigation item created in the previous step and select Go to target from the context menu.
You should see an empty Microflow like this:
Open the toolbox. It should be on the bottom right of the Mendix Modeler.
If you can’t find the toolbox, you can re-open it from the view menu.
Drag a Show Message action from the toolbox to the line between the green start and red end event. This inserts a show message action activity.
Double click the message activity to open the properties editor.
Enter Hello World as Template value and click OK.
Run the application locally and click View App to see the application in your default browser.
Locate the new navigation item in the menu bar and click it to see the message.