Skip to content

Commit ff31fe7

Browse files
committed
Updated from second review
1 parent 89a5f33 commit ff31fe7

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/activities/object-activities/committing-objects.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,17 @@ Another consequence of this is that, in contrast to an explicit **Rollback objec
113113

114114
#### What Gets Committed
115115

116-
When you work on an object in memory, Mendix records whether the object has been changed. When you perform a **Commit object(s)** activity, the current value is written to the database and Mendix marks the object as unchanged in memory. This has a couple of consequences that you might not expect:
116+
When you work on an object in memory, Mendix records whether the object has been changed. When you perform a **Commit object(s)** activity, changes to the current values are written to the database and Mendix marks the object as unchanged in memory. This has a couple of consequences that you might not expect:
117117

118118
* If you commit an object which is then rolled back due to an error, committing the object again will not write the latest version to the database. You can understand this as the following sequence (see [Error Handling in Microflows](/refguide/error-handling-in-microflows/) for a more detailed discussion of how rollbacks work during error handling):
119119

120120
1. Your microflow starts and creates a savepoint.
121121
1. You change your object – it is marked as changed.
122122
1. You perform a **Commit object(s)** activity which sends the changes to the database – the object is marked as unchanged.
123-
1. An error occurs, the microflow ends and data in the database is rolled back to the savepoint.
123+
1. An error occurs after the **Commit object(s)** has successfully sent changes to the database, the microflow ends and data in the database is rolled back to the savepoint.
124124
1. You perform a **Commit object(s)** on the object again, but the changes are not written to the database because:
125125

126-
* The object in memory still has your changes
127-
* The object in memory was marked as unchanged after your previous commit
126+
* The object in memory still has your changes but it was marked as unchanged after your previous commit
128127
* The **Commit object(s)** activity does not see the changed marker and so does not recognize that your object in memory has changes which need to be written.
129128

130129
If you want to keep the changes in the latest version you will have to work around this behavior.

content/en/docs/refguide/modeling/application-logic/microflows-and-nanoflows/microflows/error-handling-in-microflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In summary, the four error handling options do the following:
2828

2929
| Option | Behavior |
3030
| --- | --- |
31-
| Rollback (default) | All changes are reverted to the state before the microflow started, the microflow aborts, and a system error message is shown. |
31+
| Rollback (default) | All changes are reverted to the state before the microflow started, the microflow aborts, and a system error message is shown unless custom error handling is added in a microflow which called this one. |
3232
| Custom with rollback | All changes are reverted to the state before the microflow started, an error flow is followed, and the microflow's subsequent behavior depends on whether the error handling flow ends with an error or end event. |
3333
| Custom without rollback | Changes made before the activity causing the error are kept, an error flow is followed, and the microflow's subsequent behavior depends on whether the error handling flow ends with an error or end event. |
3434
| Continue | The microflow proceeds as if no error occurred, keeping all changes made before the activity causing the error, and no error message is logged or displayed to the end-user. |

0 commit comments

Comments
 (0)