MICROFLOW IN MENDIX

Adding logic to an application in Mendix

In Mendix adding logic to any application improves the power of the application by adding intelligence and more functionalities to it.

Mendix being a low code platform provides tools to build, test, deploy and iterate applications. In order to add logic to your application it provides visual ways of expressing the logic that usually ends up in functions or methods of the programming code. It consists of two components:

  • Microflows
  • Nanoflows

Microflows

In regular applications, it is required to write lines of code to add logic to the application. Mendix consists of microflows to express the logic of your application. A microflow is composed of elements that contain inbuilt logic and are represented using graphical notations. These elements when arranged as per requirement in a flow build a logic and the flow created is called a Microflow.

Microflows 600x176 1

The elements of a microflow can be categorized as:

  • Mendix Events: It consists of components that represent the occurrence of operation and contains the following:
    • Start Event: It defines the starting point of a microflow and is represented using green dot notation. A microflow can have a single start event only.
    • End Event: It defines the point where the microflow comes to an end. There can be multiple endpoints to a microflow. It is identified as a red dot.
    • Error Event: This event defines a point in the microflow where it stops and throws an error.
    • Continue Event: It is used inside a loop only to stop the current iteration and start with the next one.
    • Break Event: It can be used inside a loop only to stop the iteration and continue with the rest part of the flow.
microflows events
  • Mendix Flows: In order to connection different elements of a microflow, flows are used. The components include:
    • Sequence Flow: It is graphically represented as an arrow. It connects different elements of a microflow and defines the order of execution in the microflow.
    • Annotation Flow: It is used to connect an annotation to an element and is represented using a dashed line.
  • Mendix Decisions: It is used for depicting the flow to choose when multiple options based on different choices or conditions are available in a microflow. Microflows don’t support parallel execution therefore only a single outgoing flow leads to the output.
    They are represented as diagonal boxes with different colours to differentiate the decision types. The different types of elements include:

    • Decision: It is used for making a choice based on a condition and get the respective output.
    • Object Type Decision: It is used to choose the output flow based on the specialization of the selected object.
    • Merge: It is used to merge multiple paths of the microflow into a single path as per the requirement.
decisions
  • Mendix Activities: It consists of all the operations that can be performed in the microflow. It is depicted as a rectangle with rounded corners.
    Activities can be classified based on the item selected to perform actions like Object Activities, List Activities, Variable Activities, Integration Activities, Logging Activities etc.
activity
objective activities
client activities
list activities

Some examples of activities include

Some examples of activities include

Create Object: It is used to create an object in Mendix

create

Commit Object: It is used to commit the changes to the object in Mendix

commit

List Operation: It performs actions on the list in Mendix

add to list
  • Mendix Loop: To add the function of iteration over a list of objects, a loop is used. A loop cannot have a Start and End elements
iterator
  • Mendix Annotation: This element is used to add comments to an event in the microflow
annotiation
  • Mendix Parameter: A parameter is used to provide an input to the microflow
param1

The integrated set of tools and features provided by Mendix makes it a low code platform suitable for rapid and collaborative development of complex business applications.

[newsletter_form form="1" list="1"]

Disclaimer: I am the author at PLM ECOSYSTEM, focusing on developing digital-thread platforms with capabilities across CAD, CAM, CAE, PLM, ERP, and IT systems to manage the product data lifecycle and connect various industry networks. My opinions may be biased. Articles and thoughts on PLMES represent solely the author's views and not necessarily those of the company. Reviews and mentions do not imply endorsement or recommendations for purchase.