Column Based Concurrent Update Sample

Stable Version 1.0.0 (OutSystems 11)
Published on 1 Jun by 

Column Based Concurrent Update Sample

Details
This forge component shows a sample implementation to achieve column-based concurrent update. This sample shows how we can implement exclusive access control in the following use cases. Scenario 1: User A and B concurrently access the same record of SampleTable. User A modified ‘Name’ field and saved the data. Then, User B modifies ‘Description’ field and saves the data. In this scenario, User B can save his/her data without any warning. Scenario 2: User A and B concurrently access the same record of SampleTable. User A modified ‘Description' field and saved the data. Then, User B modifies ‘Description' field and saves the data. In this scenario, User B gets warning. The warning says "The Description field was already modified. Will you override it with your data?"
Read More

Regarding the exclusive access control for OutSystems application, you can refer to the following document.


How To Handle Concurrent Updates on Application Data Records:

https://success.outsystems.com/Documentation/How-to_Guides/Data/How_To_Handle_Concurrent_Updates_on_Application_Data_Records


Following the method noted in the document, you can implement a kind of Optimistic Locking and notify the user if the collision occurs. Then, the user can decide whether override the record or not. With this method, though the target of the concurrency is the whole record. If you need to control the exclusiveness based on each field (column) not the whole record (table’s row), you need to figure out the way to implement it.


This forge component shows a sample implementation to achieve the column-based concurrent update. This sample shows how we can implement exclusive access control in the following use cases.


SampleTable

 - Name

 - Description


Scenario 1:

User A and B concurrently access the same record of SampleTable. User A modified ‘Name’ field and saved the data. Then, User B modifies ‘Description’ field and saves the data.

-> In this scenario, User B can save his/her data without any warning.


Scenario 2:

User A and B concurrently access the same record of SampleTable. User A modified ‘Description' field and saved the data. Then, User B modifies ‘Description' field and saves the data.

-> In this scenario, User B gets warning. The warning says "The Description field was already modified. Will you override it with your data?"


 Please note OutSystems does not provide a method to iterate entity's attributes, this sample needed to check each attribute value with hard-coded if/switch statements.

Reviews (0)
Category
Samples & How-tos
Tags
Support Options
This component is not supported by OutSystems. You may use the discussion forums to leave suggestions or obtain best-effort support from the community, including from Tsuyoshi Kawarasaki who created this component.
Dependencies
See all 1 dependencies
Requirements
Platform:
11.8.0.12006
Database:
All
Stack:
.NET
Component Consumers
No consumers yet.
Weekly Downloads 
More from Tsuyoshi Kawarasaki