OBEROn - Bug Trace - Oberon Platform
Viewing Issue Advanced Details
73 Platform functionalities feature N/A 2012-04-08 08:31 2012-08-08 15:56
g_prajeesh  
administrator  
high  
resolved 2.6 - DB build 0065  
fixed  
none    
none 3.0 - DB build 0067  
0000073: Need a functionality so that any update can be raised when two people are trying to save data
As of now if two people are working on the same oberon object, there is highly possible that one person changes are overwritten by the second person.

if we have some logic such as counter, when the second person tries to save, the system should raise an exception if the person trying to save has a stale object. Mirko we already discussed this and I strongly feel that it should be handled in platform as the DB transactions are not exposed to application level
Issue History
2012-04-08 08:31 g_prajeesh New Issue
2012-05-05 22:49 administrator Assigned To => administrator
2012-05-05 22:49 administrator Status new => assigned
2012-07-12 13:30 administrator Status assigned => resolved
2012-07-12 13:30 administrator Fixed in Version => 2.7 build 0066
2012-07-12 13:30 administrator Resolution open => fixed
2012-08-08 15:23 administrator Target Version => 2.7 build 0066
2012-08-08 15:51 administrator Note Added: 0000144
2012-08-08 15:56 administrator Note Added: 0000145
2012-08-08 15:57 administrator Note Edited: 0000144
2012-08-08 15:59 administrator Note Edited: 0000145

Notes
(0000144)
administrator   
2012-08-08 15:51   
(edited on: 2012-08-08 15:57)
Added the new "checkupdate" option for objects (in the lifecycle definition) and links (in the linktype definition)

lifecycle edit <LCNAME> ... [!|not]checkupdate... ;
lifecycle show <LCNAME> get { ... checkupdate ... } token ... ;

linktype edit <LTNAME> ... [!|not]checkupdate... ;
linktype show <LTNAME> get { ... checkupdate... } token ... ;

If the "checkupdate" flag is enabled, each modification performed on the object/link increases an internal counter. When another user updates the instance, the sync counter that you read before appling your changes is not the same and the platform blocks the operation returning the message like: "Your instance is out-of-date, please reload it before apply changes"

It is possible to read the current value of sync counter in the following way:

object show <id/CNR> get { ... counter ... } token ... ;
link show <id> get { ... counter ... } token ... ;

when you need to update the instance you may use the "sync" option, reporting the previously read value:

object edit <id/CNR> sync <value> ... ;
link edit <id> sync <value> ... ;

(0000145)
administrator   
2012-08-08 15:56   
(edited on: 2012-08-08 15:59)
Added also the new SDK methods for Lifecycle and LinkType classe:

void setCheckUpdate(boolean checkUpdate) // Set the checkUpdate option
boolean isCheckUpdate() // Check if the checkUpdate option is active

and the getter method: int getSyncCounter()

to read the current sync counter for ObjectObj and Link classes instances