Nanoflows are similar to microflows, they permit you to express logic precisely. They run directly on the browser/app which makes it perfect for UI validation and offline logic since they don’t require a connection to the backend/server. Elements, when arranged as per the necessity of the applications during a flow to create a logic and this flow created, is termed a Nanoflows.
- Workflows – Workflows are the processes and tasks seen in large-scale, persisted automation scenarios.
- Microflows – Microflows are the address automation use cases also, but they are short-lived, run on the server, and are typically triggered by the user, through an API or by an occurrence. They typically perform a variety of actions, including multiple database operations.
- Nanoflows – Nanoflows are intended to be triggered by the user and typically have a short lifespan making them perfect for client-side-based actions like UI transitions. Nanoflows extend visually modeled logic to the sting. Increase responsiveness for UI interactions because of client-side execution. No server connection is required allowing extended use cases of offline apps. Support hot reloading within the modeler allowing faster development/test cycles.
Nanoflows make it easy to make more dynamic and responsive apps by providing the simplest way to model complex validation or calculations with instant feedback, build interactive and dynamic user interfaces on top of intelligent navigation, and build smooth, state-to-state UI transitions. Because nanoflows run on the client, they are doing not require an online connection and are perfect to be used in offline apps too. While nanoflows are great for offline and hybrid apps.
- Offline mobile apps
- Execution of actions in the client (Eg: close page)
- Client (browser/device)
- Executed in the user context
- Every call a transaction
- Not available
- Default executed in the system context
- Single transaction
- After the microflow is executed
Currently, nanoflows are most beneficial in offline apps but can also be useful for executing logic that does not retrieve plenty of information.
Nanoflows are designed with offline applications as we can model them according to the application logic that works on these offline applications. Since all the database-related operations are executed on the local database so nanoflows in offline apps will be faster.
Logic Where No Connection Is Needed – Nanoflows also provide greater value to online applications. When one executes the database related operations, each operation will create a separate network request to the Mendix Runtime.
- When there are multiple calls to the DB/server
- Deleting objects
- When java actions are needed
- To make calls to sub-flows
- Smart Validation
- Perform calculations
- Retrieve* and manipulate data
- Navigation/UI logic
- Offline Apps.
Operations Interact With The Database:
|Arrow Keys||Selects the nearby element (activity, event, loop) in the direction of the arrow|
|Enter||Edits the properties of the selected element|
|F2||Renames the item returned by the selected element|
|Shift+F2||Edits the caption of the selected element|
|Ctrl+arrow keys||Moves the selected element in the direction of the arrow|
|Tab||If a loop is selected, the first element inside the loop is selected|
|Shift+Tab||If an element inside a loop is selected, the loop itself is selected|
|Home||Selects the start event|
|End||Cycles through the end events|
|Shift+F10||Opens the context menu for the currently selected element|