Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
7 subscribers
Views
5071 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Hi, is it possible to lock a record to avoid overriding the other users data, if
jyothisa
over 10 years ago
Hi, is it possible to lock a record to avoid overriding the other users data, if two users are in the same form? How can we achieve this functionality in SAIL interfaces.
OriginalPostID-140286
OriginalPostID-140286
Discussion posts and replies are publicly visible
Top Replies
alland
over 10 years ago
+1
Certified Lead Developer
You could also consider using the @Version JPA annotation within a CDT. This would automatically create a column in your database table to hold a lock Id in a similar way to Tims 'lock table' approach…
Parents
0
Tim
Certified Lead Developer
over 10 years ago
You can build your own record locking functionality quite simply.
I'm assuming you have an entity backed record for this example where upon the start of a related action that updates the record data the 1st thing you'd do is query a record lock table and if null insert a row that would hold the recordId, user, timestamp. This row would then be deleted upon completion of the update action. If any other user attempts to access the same record (whilst a row exists in your lock table) you can route them off to an error screen. For a more optimistic method you could consider querying the record lock table within a with() expression in your SAIL form but performance concerns would probably rule this out. You will also need to consider how to release locks on incomplete processes etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Tim
Certified Lead Developer
over 10 years ago
You can build your own record locking functionality quite simply.
I'm assuming you have an entity backed record for this example where upon the start of a related action that updates the record data the 1st thing you'd do is query a record lock table and if null insert a row that would hold the recordId, user, timestamp. This row would then be deleted upon completion of the update action. If any other user attempts to access the same record (whilst a row exists in your lock table) you can route them off to an error screen. For a more optimistic method you could consider querying the record lock table within a with() expression in your SAIL form but performance concerns would probably rule this out. You will also need to consider how to release locks on incomplete processes etc.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data