Skip to content

Commit 29ec6f8

Browse files
authored
Merge pull request mendix#8916 from mendix/yl-create-object-activity-in-nanoflows
Add information about the Create object activity in nanoflows
2 parents 45ba1af + ec85ee2 commit 29ec6f8

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

  • content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/nanoflows

content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/nanoflows/_index.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ description: "Presents an overview of all the elements that can be used in a nan
88

99
## Introduction
1010

11-
Nanoflows are similar to [microflows](/refguide/microflows/), in that they allow you to express the logic of your application. However, they do have some specific benefits (for example, they run directly on the browser/device and can be used in an offline app). Furthermore, most of the actions run directly on the device, so there is also a speed benefit for logic which does not need access to the server. For more information on how nanoflows and microflows differ, see the [Differences between Microflows and Nanoflows](/refguide/microflows-and-nanoflows/#differences) section in *Microflows and Nanoflows*.
11+
Nanoflows are similar to [microflows](/refguide/microflows/), in that they allow you to express the logic of your application. However, they do have some specific benefits. For example, they run directly on a browser/device and hence can be used in an offline app. Furthermore, since most of the activities run directly on the device, there is also a speed benefit for logic which does not need access to the server. For more information on how nanoflows and microflows differ, see the [Differences between Microflows and Nanoflows](/refguide/microflows-and-nanoflows/#differences) section in *Microflows and Nanoflows*.
1212

1313
This page is an overview of all the elements that can be used in a nanoflow. For the properties of the nanoflow itself, see [Nanoflow Properties](/refguide/nanoflow/).
1414

@@ -18,28 +18,32 @@ For information on using nanoflows as data sources, see [Nanoflow Source](/refgu
1818

1919
### Offline Mobile Apps
2020

21-
Nanoflows are designed with offline-first applications in mind, as they allow you to model application logic that works in offline apps. Since all database-related actions will be executed on the local offline database, nanoflows in offline apps will be fast.
21+
Nanoflows are designed with offline-first applications in mind, as they allow you to model application logic that works in offline apps. Since all database-related activities will be executed on the local offline database, nanoflows in offline apps will be fast.
2222

2323
### Logic Where No Connection Is Needed
2424

25-
Nanoflows also offer great value to online applications (for example, for UI logic, validations, calculations, and navigation). However, please keep in mind that, when you perform database-related actions, each action will create a separate network request to the Mendix Runtime.
25+
Nanoflows also offer great value to online applications (for example, for UI logic, validations, calculations, and navigation). However, please keep in mind that, when you perform database-related activities, each activity creates a separate network request to the Mendix Runtime.
2626

27-
The following actions interact with the database:
27+
The following activities interact with the database:
2828

29-
* Create
30-
* Commit
31-
* Retrieve
32-
* Rollback
29+
* [Create object](/refguide/create-object/)
30+
* [Commit object(s)](/refguide/committing-objects/)
31+
* [Retrieve](/refguide/retrieve/)
32+
* [Rollback object](/refguide/rollback-object/)
3333

34-
Therefore, the best practice is to use nanoflows in online applications when they do not contain the above actions.
34+
Therefore, the best practice is to use nanoflows in online applications when they do not contain the above activities.
3535

3636
{{% alert color="info" %}}
37-
Changing objects without committing is not a database-related action, as changes are applied on the device or in the browser.
37+
An exception for the **Create object** activity is that you can use it to create a new [non-persistable entity](/refguide/persistability/#non-persistable), and this NPE has no error handlers, calculated attributes, or read-only attributes. In this case, no request is sent to the Mendix Runtime.
38+
{{% /alert %}}
39+
40+
{{% alert color="info" %}}
41+
Changing objects without committing is not a database-related activity, as changes are applied on the device or in the browser.
3842
{{% /alert %}}
3943

4044
#### Other Cases
4145

42-
Although nanoflows perform best in online applications when no database-related actions are used, and these are generally the best cases, nanoflows that contain at most one database-related action can also still perform well. Because such nanoflows only require one network call, they perform as well as a microflow. An example of such a use case is performing validation logic on an object and committing the object in the same nanoflow.
46+
Although nanoflows perform best in online applications when no database-related activities are used, and these are generally the best cases, nanoflows that contain at most one database-related activity can also still perform well. Because such nanoflows only require one network call, they perform as well as a microflow. An example of such a use case is performing validation logic on an object and committing the object in the same nanoflow.
4347

4448
## Notation and Categories
4549

@@ -134,7 +138,7 @@ To convert a nanoflow to a microflow, you have two options. The first option is
134138

135139
{{< figure src="/attachments/refguide/modeling/application-logic/microflows-and-nanoflows/nanoflows/convert-to-microflow.PNG" alt="Convert to microflow" width="550px" class="no-border" >}}
136140

137-
A new microflow is created and added to the same directory, and you can get consistency errors if there are actions that are not supported by microflows.
141+
A new microflow is created and added to the same directory, and you can get consistency errors if there are elements that are not supported by microflows.
138142

139143
## Canvas Interaction
140144

0 commit comments

Comments
 (0)