Skip to content

Commit 6ca187c

Browse files
committed
Extra TW review
1 parent 1166dba commit 6ca187c

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

content/en/docs/refguide/runtime/optimistic-locking.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ For example, if one user commits changes for `AttributeA` and `AttributeB` and a
2424

2525
## Behavior of App with Optimistic Locking Enabled
2626

27-
The Mendix runtime implements optimistic locking by tracking the version of all objects using the attribute `MxObjectVersion` with type `Long`. Although the `MxObjectVersion` attribute is not write-protected, setting this value will **not** result in it being saved to the database. Its current value will be compared with the value for the same object in the database.
27+
The Mendix runtime implements optimistic locking by tracking the version of all objects using the attribute `MxObjectVersion` with type `Long`. Although the `MxObjectVersion` attribute is not write-protected, setting this value does not result in it being saved to the database. Its current value is compared with the value for the same object in the database.
2828

2929
### How to Enable and Use Optimistic Locking
3030

31-
You can enable optimistic locking for your Mendix application in the `Runtime` tab in the App settings dialog:
31+
You can enable optimistic locking for your Mendix application in the `Runtime` tab in the **App Settings** dialog:
3232

3333
{{< figure src="/attachments/refguide/runtime/optimistic-locking/runtime-settings-dialog.png" >}}
3434

35-
After optimistic locking is enabled, whenever a commit is executed, the Mendix runtime will automatically ensure that the object that is committed was not already changed by another party after the committer retrieved the object.
35+
After optimistic locking is enabled, whenever a commit is executed, the Mendix runtime automatically ensures that the object that is committed was not already changed by another party after the committer retrieved the object.
3636

3737
### New Projects and Migration
3838

39-
If an existing app already has the `MxObjectVersion` attribute, a duplicate attribute will be reported in Studio Pro when optimistic locking is enabled. This must be fixed by renaming the existing attribute to another name. The system attribute cannot be renamed.
39+
If an existing app already has the `MxObjectVersion` attribute, a duplicate attribute is reported in Studio Pro when optimistic locking is enabled. This must be fixed by renaming the existing attribute. The system attribute cannot be renamed.
4040

4141
### Behavior
4242

43-
The following runtime actions are influenced by optimistic locking:
43+
The following runtime actions are influenced by optimistic locking.
4444

4545
#### Create Object
4646

@@ -52,7 +52,7 @@ When the `MxObjectVersion` attribute in the object being committed is different
5252

5353
#### Delete Object
5454

55-
When the `MxObjectVersion` attribute in the object being deleted is different from the value in the database, the runtime throw a `ConcurrentModificationRuntimeException`. Otherwise, it proceeds with the delete. If the object has already been deleted, no error occurs.
55+
When the `MxObjectVersion` attribute in the object being deleted is different from the value in the database, the runtime throws a `ConcurrentModificationRuntimeException`. Otherwise, it proceeds with the delete. If the object has already been deleted, no error occurs.
5656

5757
## Performance Impact
5858

@@ -73,7 +73,7 @@ com.mendix.systemwideinterfaces.connectionbus.data.ConcurrentModificationRuntime
7373
Object of type 'MyFirstModule.MyEntity' with guid '3940649673949185' cannot be updated, as it is modified by someone else at MyFirstModule.MyMicroflow (Change : 'Change 'MyEntity'')
7474
```
7575

76-
The above error shows that there was a `ConcurrentModificationRuntimeException` during execution of the change action `Change 'MyEntity'` of the microflow `MyFirstModule.MyMicroflow`. The object had the id `3940649673949185` and was of type `MyFirstModule.MyEntity`.
76+
This error shows that there was a `ConcurrentModificationRuntimeException` while executing the `Change 'MyEntity'` change action of the `MyFirstModule.MyMicroflow` microflow. The object had the `3940649673949185` ID and was of type `MyFirstModule.MyEntity`.
7777

7878
If committing an object causes an optimistic locking error, trying to commit the same object without reloading always results in an optimistic locking error.
7979

@@ -82,10 +82,10 @@ If the changes are still deemed valid, you can retry the action causing the opti
8282
1. Change the error handling for that action to either `Custom with Rollback` or `Custom without Rollback`, and do the following steps in the error flow.
8383
2. If `$latestError/ErrorType` is `com.mendix.systemwideinterfaces.connectionbus.data.ConcurrentModificationRuntimeException`.
8484
3. Retrieve a fresh copy of the object from the database.
85-
4. Apply the original changes onto the retrieved copy.
85+
4. Apply the original changes to the retrieved copy.
8686
5. Perform the operation again.
8787

88-
You can see an example implementation in the image below. The change action has error handling `Custom without Rollback`. If an optimistic locking error is detected, the latest version of the object is retrieved from the database, changes are applied again, and the change action is retried.
88+
You can see an example implementation in the following image. The change action has error handling `Custom without Rollback`. If an optimistic locking error is detected, the latest version of the object is retrieved from the database, changes are applied again, and the change action is retried.
8989

9090
{{< figure src="/attachments/refguide/runtime/optimistic-locking/retry-example.png" >}}
9191

@@ -97,7 +97,7 @@ You can handle optimistic locking errors in Java actions using similar steps to
9797

9898
## Handling Optimistic Locking Errors in the Client
9999

100-
If the optimistic locking error is propagated to the client, then you will see the following error: "The data you're trying to save has already been modified by another user. Please refresh the page and try again."
100+
If the optimistic locking error is propagated to the client, the following error is displayed: "The data you're trying to save has already been modified by another user. Please refresh the page and try again."
101101

102102
{{< figure src="/attachments/refguide/runtime/optimistic-locking/optimistic-locking-error-dialog.png" >}}
103103

0 commit comments

Comments
 (0)